If you run a 10 kilometer race in 42 minutes 42 seconds , what is your average pace ( time per mile in minutes and seconds )? What is your average speed in miles per hour
dist = 10
t_m = 42
t_s = 42
t_m_s = t_s*60 + t_s
a_p = t_m_s/dist
a_m = int(a_p //60)
a_s = int(a_p % 60)
m_h = int(dist/(t_m_s/3600))
print(f'time per mile {a_m} minutes and {a_s} seconds')
print(f'average speed {m_h} miles per hour')
Comments
Leave a comment