Python Program to Convert Kilometers to Miles

Write a Python Program to Convert Kilometers to Miles or km to miles. Both are the international system of units. Countries like the united states and the united kingdom measure distance using the miles metric system.

This Python example enables entering the kilometers and converts them to miles. As we know the conversation factor, one kilometer approximately equals 0.621371 miles.

# Kilometers to Miles or KM to Miles conversion

kilometers = float(input("Enter the Kilometers = "))
 
miles = kilometers * 0.621371
 
print("%.2f Kilometers equals %.4f Miles" %(kilometers, miles))
Python Program to Convert Kilometers to Miles