Programming Examples
Python program to convert kilometers to miles
Program to convert kilometers to miles
Solution
km=float(input("Enter the value in kilometers :"))
conv_fac=0.621371
miles=km*conv_fac
print("The entered value in Miles :",miles)
Output
km=float(input("Enter the value in kilometers :"))
conv_fac=0.621371
miles=km*conv_fac
print("The entered value in Miles :",miles)