Q. Write a short program that asks for your height in centimeter and then converts your height in feet and inches. (1 foot = 12 inches, 1 inch = 2.54 cm).
You can understand by Watching video :-
Answer :-
height = int(input("Enter your height in centimeter = ")) inch = height/2.54 feet = inch/12 print("height in feet = ",feet) print("height in inch = ",inch)
Output :-
Enter your height in centimeter = 181
height in feet = 5.938320209973753
height in inch = 71.25984251968504
>>>
Enter your height in centimeter = 145
height in feet = 4.757217847769029
height in inch = 57.08661417322835
>>>
thanks
ReplyDeleteWelcome 😊😊
DeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )