Question: PLEASE USE BASIC PYTHON LANGUAGE SINCE THIS IS A BEGINNER CLASS PLEASE AND THANK YOU. No conditinals used please Question 3 ( hw 2 _
PLEASE USE BASIC PYTHON LANGUAGE SINCE THIS IS A BEGINNER CLASS PLEASE AND THANK YOU. No conditinals used please
Question hwqpy: Write a program that calculates the estimated time of arrival to a location given a number of random factors.
First, ask the user to enter the start time of the trip as a pair of integers hours and minutes Next, determine a random length in kilometers to the destination. The value should be between and Calculate a random average speed for the trip in kilometers per hour in the range of and Both the trip length and average speed should be printed to decimal places.
Given the range and average speed, we can easily calculate the estimated time of arrival. In performing this calculation, be cautious that you represent the time correctly. That is if the time minutes, you will need to adjust the hour number and the minutes. A trip that starts at and takes : is not simply : Calculate, store, and print this value as the "base" arrival time.
However, this is New York and New Jersey; we don't go anywhere without traffic. Our trip will include accidents along the way that will impact our arrival time. Calculate randomly three time delays in the range of to minutes to account for the accident, and apply the additional delay times a the floor of the values to the arrival time. Your program will also print the three delays and the final arrival time at our destination. Finally, print the new average speed of the trip accounting for the added time delays.
Example Executions
Enter the start time in hours:
Enter the start time in minutes:
Length of trip: kilometers.
Average speed during trip: kilometers per hour.
Base arrival time: :
There were three delays as follows: and minutes.
The final arrival time was: :
Final average speed of trip: kilometers per hour.
Enter the start time in hours:
Enter the start time in minutes:
Length of trip: kilometers.
Average speed during trip: kilometers per hour.
Base arrival time: :
There were three delays as follows: and minutes.
The final arrival time was: :
Final average speed of trip: kilometers per hour.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
