code:
print("Input your height: ")
h_ft = int(input("Feet: "))
h_inch = int(input("Inches: "))
h_inch += h_ft * 12
h_cm = round(h_inch * 2.54, 1)
print("Your height is : %d cm." % h_cm)
output:-Input your height:
Feet: 10
Inches: 5
Your height is : 317 cm.
Feet: 10
Inches: 5
Your height is : 317 cm.
Post a Comment
If you have any doubts, Please let me know
Thanks!