Welcomes the user to the Travel Time Calculator. Asks user for number of miles traveled(allow user to enter fractional values) Asks user for the speed in miles per hour (allow user to enter fractional values) Calculates the number of hours and minutes for the trip to the nearest integer value. Hint:
my script:
Write a program that calculates the estima#welcome banner
print("Welcome to the Trip Time Calculator") #banner
print()
#ask user for speed/mph and distance in miles
miles = float(input("Enter the miles travled:\t "))
mph = float(input("Enter the miles per hour:\t "))
miles = float(miles)
mph = float(mph)
print()
#print results
#speed=distance/time
#time=distance/speed
#distance=speed*time
print("Estimated traveled time")
hours = (round((miles // mph), ))#t=d/s
minutes = float(round((miles % mph), )) #returns wrong output
print("Hours:\t ", hours,
"\nMinutes: ", minutes)
ted hours and minutes for a trip given the number of miles traveled and the speed in miles per hour.
Specifically, write a program that
- Welcomes the user to the Travel Time Calculator.
- Asks user for number of miles traveled(allow user to enter fractional values)
- Asks user for the speed in miles per hour (allow user to enter fractional values)
- Calculates the number of hours and minutes for the trip to the nearest integer value. Hint: You can use the built-in function round that rounds a given number to the rounded integer value. e.g. round(4) will return 4, round(4.125) will return 4, round(4.5) will return 4 and round (4.75) will return 5.
- Prints the number of hours and minutes for the trip.
Here are some sample runs:
![à Python 3.8.1 Shell
Eile Edit Shell Debug Options Window Help
Welcome to the Trip Time Calculator
Enter the miles traveled: 200
Enter the miles per hour: 65
Estimated travel time
Hours: 3
Minutes: 5
>>> |
Ln: 13 Col: 4
Python 3.8.1 Shell
Eile Edit Shell Debug Options Window Help
Welcome to the Trip Time Calculator
Enter the miles traveled: 310.5
Enter the miles per hour: 80.5
Estimated travel time
Hours: 3
Minutes: 51
>>>
Ln: 23 Col: 4](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F535fabf5-596d-4dc5-9762-a0ef7f611594%2Fa58eb94d-29f5-4f64-919f-5c18c23d7c0a%2Fo304he_processed.jpeg&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 3 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)