Write a Python program to enter length in centimeter and convert it into meter and kilometer.

PROGRAM

# Python program to convert length from centimeters to meters and kilometers
# Input: Length in centimeters
cm = float(input(“Enter length in centimeters: “))
# Convert to meters and kilometers
meter = cm / 100
kilometer = cm / 100000
# Output the results
print(“Length in meters:”, meter)
print(“Length in kilometers:”, kilometer)

OUTPUT

TRY THE ABOVE CODE

Leave a Reply

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

sign up!

We’ll send you the hottest deals straight to your inbox so you’re always in on the best-kept software secrets.