W.A.P TO INPUT A NUMBER IN KM AND CONVERT IT INTO MILES. EXAMPLE:IF USER WILL INPUT 1KM THEN IT WILL SHOW 0.621371 MILES.
Answers
Answered by
0
Your program :-
# Taking kilometers input from the user
kilometers = float(input("Enter value in kilometers: "))
# conversion factor
conv_fac = 0.621371
# calculate miles
miles = kilometers * conv_fac
print('%0.2f kilometers is equal to %0.2f miles' %(kilometers,miles))
Hope I am correct and it helps :)
Similar questions