Python program to convert kilometers to miles

Views: 52   

Following program shows you how to convert kilometers to miles.
In this program we get kilometers from user, once we get those we need to divide with 1.6 so that we get in miles

kilometers = float(input("Please enter kilometers:"))
miles = kilometers / 1.6
print(miles, " Miles")

Output:

Please enter kilometers: 22
13.75  Miles
On By