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

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

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

Previous Post

8. Write a program to display area and circumference of circle.

Next Post

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

Related Posts