Write a program to convert kilometers to miles


Topic: Write a program to convert kilometers to miles

Solution

kilometers = float(input('How many kilometers?: '))  
conv_fac = 0.621371  
miles = kilometers * conv_fac  
print('%0.3f kilometers is equal to %0.3f miles' %(kilometers,miles))  



List all Python Programs