Question: Write a function called convert _ speed which takes a speed in kilometers per hour ( kph ) as an argument. Your function should convert
Write a function called convertspeed which takes a speed in kilometers per hour kph as an argument. Your
function should convert kilometers per hour kph to miles per hour mph and return mph as a float. For example,
km mi Assume one kilometer has miles. Use type annotation in the function header to denote
the appropriate data types.
b The distance a vehicle travels can be calculated as distance speed times time. Write a function
called distancetraveled which takes two positive floatingpoint numbers, the speed of a vehicle in kilometers
per hour and the hours it has traveled as arguments. The function returns the total distance traveled in miles as a
float. For example the distance traveled in hours at kph is miles. Your function must call
convertspeed. Use type annotations in the function header to denote the appropriate data types.
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
