Question: Write a program that prompts a user to enter the average speed of a vehicle traveling and the time which it traveled. The speed
Write a program that prompts a user to enter the average speed of a vehicle traveling and the time which it traveled. The speed should be given in miles-per-hour (MPH) and the time should be in hours. Once entered, the program should calculate the distance traveled at EACH hour of the vehicle's journey. The output should look something like this: What is the speed of the vehicle? (MPH): 40 How many hours has is traveled for?: 3 Hour Distance 1 2 3 40 80 120 You can use the following formula to calculate the dista traveled at each hour: Distance Traveled = Speed * Time
Step by Step Solution
3.33 Rating (159 Votes )
There are 3 Steps involved in it
5 MA JS 8 mainpy def calculatedistancespeed time return s... View full answer
Get step-by-step solutions from verified subject matter experts
