(Average speed) Assume a runner runs 14 kılometers in 45 minutes and 30 sec-
onds. Write a program that displays the average speed in miles per hour. (Note that
1 mile is 1.6 kilometers.)
dist = float(input("Distanse in km: "))
time = int(input("Hours: "))*3600
time += int(input("Minutes: "))*60
time += int(input("Seconds: "))
speed = ((dist/1.6)/time)*3600
print(f"Average speed = {speed} miles per hour")
Comments
Leave a comment