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

# Program to ask distance in meter and convert into kilometer
"""
In this program, we have to calculate the kilometer when meter is given
We have the formula, 
kilometer = meter/1000
To calculate this  we have to ask the distance in meter
"""
m = float(input('enter the distance in meter'));
kilometer = m/1000
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=1200
kilometer = m/1000
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

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

Next Post

Basic definition of QBasic

Related Posts