Python Function that converts inches to centimetre.

#Python Function that converts inches to centimetre.

def convert(a):
	cm1 = float(a*2.54)
	return cm1    
print("\nEnter value in Inch : ")
inch = int(input());
cm=convert(inch)
print(inch ," inch is equal to ", cm ," centimeter ")

Output :
Enter value in Inch : 50

50.00 inch is equal to 127.00 centimeter



Leave a comment