INTRODUCTION:
Aninnovationinfishingisbeingabletohaveaboatfollowapath plotted on a map. This allows the fisherman to focus on fishing, leaving the driving of the boat to a computer-controlled electric trolling motor. Your company would like to make a sea-going fishing boat capable of this autonomous navigation. However, electric motors are not powerful enough to use on large bodies of water, and the company is planning to use the inboard motor. The computer controlling the navigation can control both position and speed. Based on laboratory testing, the following data set was generated:
Motor RPM |
Boat Speed (knots) |
900 |
6.43 |
1100 |
7.61 |
1300 |
8.82 |
1500 |
9.86 |
1700 |
10.88 |
1900 |
12.86 |
From this data, the company developed the following equation to find speed as a function of motor RPM:
Where:s = speed in knots
x = boat motor RPM
While this equation is an approximation, the company finds it accurate enough for this particular application.
ASSIGNMENT:
Write a Python program capable of estimating the boat’s speed in knots, in miles per hour, and in kilometers per hour for a user-entered RPM.
You will need some conversion factors to find these speeds. Hints:
1 knot = 1.15078 mile per hour
1 knot = 1.852 kilometer per hour
1 mile per hour = 1.60934 kilometers per hour
Store these as constants at the start of your code, as demonstrated in the in-class examples.
Use the “Code_Setup.py” template on Blackboard to write your code.
Your program output will look like the illustration shown on page 2. Use your PC’s cursor to determine the horizontal and vertical spacing for the output format.
OUTPUT FORMAT:
*****************************************
BOAT SPEED CALCULATOR
Enter the motor RPM: x
RESULTS
Boat speed = xxxx.x knots
Boat speed = xxxx.x miles/hour
Boat speed = xxxx.x kilometers/hour
*****************************************
SUBMITTING ASSIGNMENTS:
Once you have your program working, exit the Python IDE that you are using. Make sure that your source program file name conforms to the following specifications:
sn_pn_first_last
where: sn is your section number (01, 02, 03 …)
pn is the assignment number (2)
first is your first name
last is your last name
An example for the first assignment would be 1_2_elmer_fudd.py.
Submission:
Submit both your handwritten problem-solving process and your Python source code using the Assignments button in Blackboard. Remember to submit your Python source program in Python 3 only, using code as demonstrated in class. No other format will be accepted.
If you make changes to your program and need to resubmit, rename the file such as 1_2_elmer_fudd_2.py or 1_3_elmer_fudd_3.py, etc. Then use the Assignments button in Blackboard to submit the new version. Only the most current submitted program version will be graded. You will have unlimited submissions.