Decode School

Decode School - The School for Problem Solvers

Welcome to my blog. Subscribe and get my latest blog post in your inbox.

Meters to Kilo Meters in Python

Python program to get meter m from user and find kilometer km

Sample Input 1:


Sample Output 1:


Program or Solution

m=int(input("Enter Meters:"))
print("{} kilometers".format(km))


Program Explanation

get meter using input() method multiply it by 1000 (1kilometer = 1000 meters)