Computer Science, asked by wafiamazhar4023, 3 months ago

write a python script that help user to enter a length in centimeters. If the user enters a negative length the program should tell the user the entry is invalid . Otherwise the program should convert it into inches and print out the result. There are 2.54 centimeters in an inch.​

Answers

Answered by yogesh22996
1

Answer:inch = 2.54 #centimeters

centimeters = int(input("Enter a number of centimeters"))

print "Entered number of %s centimeters is equal to %s inches" % (centimeters , centimeters / inch)

Explanation:

Similar questions