Menu

Write Python 3 Program Looking Figure Following Information 1 Miles Ran Converted Kilomete Q43906005

I have to write a Python 3 program that is looking to figure outthe following information :

(1) Miles ran, converted from kilometers

(2) Average pace per mile

(3) Average miles per hour.

In order to perform the conversions above, I need to obtain thefollowing user inputs:

(1) Number of kilometers ran, a floating-point number

(2) Number of hours, a whole number

(3) Number of minutes, a whole number

The test case I will use for this code will be for a runner whoran 10 kilometers in 1 hour and 1 minute. If done correctly, theoutput should result with 6.21 miles, 9:49 pace, and 6.11MPH.  

So far, I have the following code for the user input:

distance = float (input (“Enter distance ran “))hours = int (input (“Enter hours ran “))minutes = int (input (“Enter minutes ran “))print (distance + ” km, ” + hours + ” hours, ” + minutes + ” minutes”)

On the output screen, it reads the following:

Enter distance ran 10

Enter hours ran 1

Enter minutes ran 1

I need help writing the code that will have the followingoutput:

You ran 6.21 miles

Your pace: 9 min 49 sec per mile

Your MPH: 6.11

Some other things to note:

There are 1.61 kilometers in a mile.  

The number of miles and average miles per hour should be roundedoff to two decimal places

Python’s math library has a floor function if needed, and can beaccessed through writing import math at the top of the .pyfile.  

If a calculation is done that says 10.8 minutes, that does notmean 10 minutes and 80 seconds, but rather 8/10 minutes, so aconversion would need to be made to minutes andseconds.  

Use a constant variable to store the number of kilometers in amile

Use round or format functions only for printing out, and do notsave any values that have been rounded off, floored,etc.  

Expert Answer


Answer to I have to write a Python 3 program that is looking to figure out the following information : (1) Miles ran, converted fr…

OR