Home / Expert Answers / Computer Science / answer-using-python-great-work-our-goal-is-to-determine-how-many-laps-knigtro-can-complete-around-t-pa654

(Solved): Answer using python Great work! Our goal is to determine how many laps Knigtro can complete around t ...



Answer using pythonstudent submitted image, transcription available below

Great work! Our goal is to determine how many laps Knigtro can complete around the track. The running path that Knightro takes is 3 miles. Since the distance of the track is so long, he will only start the lap around the track if he has time to complete it. - Ask the user how long Knightro has to run in hours (floating point number). - Ask the user how fast Knightro is running in miles per hour (integer) - Determine the total amount of miles Knightro can run in that time - Determine how many laps he can fully complete. - Print the number of laps he can complete Example: How many hours have to run? 0.5 How fast is Knightro running? 11 Knightro can run 1 lap(s). Reasoning: 0.5 hours * 11 miles per hour is 5.5 miles. 5.5 divided by 3 is 1.83 . Since we only want the whole number, we will cast or divide down. Restrictions Do not use the round or math library. Either use integer division or cast the variable. Do not use if statements in this program.


We have an Answer from Expert

View Expert Answer

Expert Answer





We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe