Python Program to Convert Kilometers to Miles

Write a Python Program to Convert Kilometers to Miles. This Python example enables entering the kilometers and converts them to miles. As we know, one kilometer approximately equals 0.621371 miles.

# Kilometers to Miles

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