Question: Create a Python program named CST _ 1 5 0 _ Distance _ Traveled.py . Write a function named calculate _ distance that takes speed
Create a Python program named CSTDistanceTraveled.py
Write a function named calculatedistance that takes speed and time as parameters and returns the calculated distance using the formula: Distance Speed Time.
In the main part of your program:
a Set the speed variable to speed of the car in miles per hour
b Set three time variables time time time to and respectively in hours
c Call the calculatedistance function for each time value and store the results in variables.
Display the results using print statements as follows:
a Print the distance the car will travel in time hours.
b Print the distance the car will travel in time hours.
c Print the distance the car will travel in time hours.
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
