Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In Python using if statements: Write a program that asks the user for the locations of the on-ramp and exit they plan to use on
In Python using if statements:
Write a program that asks the user for the locations of the on-ramp and exit they plan to use on the highway. It also needs to ask for how many hours until the traveler needs to arrive at their destination, and an expected average speed. The program will calculate the distance to travel and the expected travel time, given the expected average speed. Finally, the program will give one piece of advice, using this strategy: if the expected average speed is above 80 MPH, the user will be travelling dangerously (and breaking the law), warn them if the expected average speed is less than 60 MPH, the user will be causing problems on the highway, warn them if the travel time is larger than the time when the user wants to arrive, tell the user how late they will be if none of the above contiditions occur, tell the user how far they will travel, and how long they have to leave in order to be on time
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started