Brian Z. answered 01/24/20
Python Software Engineer with 5+ Yrs Experience in Data Science
Hi
distance_in_km=speed * time
=6.2(MpH) * 30(minutes)
= 6.2 *0.5
1 kilometer is 0.621371 miles so 1mile is 1.6093444
so
distance_in_km=6.2 *0.5 * 1.6093444
distance_in_km =4.9889679435
in python programming language there is a function round, it returns a floating point number that is a rounded version of the specified number, with the specified number of decimals.
so the response is:
res = round(distance_in_km,3)
Good Luck