10.Write a program in python to ask distance in miles and convert into kilometer

# Program to ask distance in miles and convert into kilometer
"""
In this program, we have to calculate the kilometer when miles is given
We have the formula, 
kilometer = miles/0.62
To calculate this  we have to ask the distance in miles
"""
m = float(input('enter the distance in miles'));
kilometer = m/0.62
print("Distance in kilometer is", kilometer)
 
"""
If the values are explicitly given.
Then we do not have to ask the values from the user
"""
m=12.4
kilometer = m/0.62
print("Distance in kilometer is", kilometer)
Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post

9. Write a program in python to ask distance in kilometer and convert into miles.

Next Post

11. Write a program in python to input distance in meter and convert into kilometer.

Related Posts