Tech Study

Write a Python program to convert height (in feet and inches) to centimeters

Introduction

Write a Python program to convert height (in feet and inches) to centimeters. I have used python 3.7 compiler for debugging purpose.

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)

Result

Write a Python program to convert height (in feet and inches) to centimeters
Write a Python program to convert height (in feet and inches) to centimeters

TaggedWrite a Python program to convert height (in feet and inches) to centimeters

Java Final keyword

Introduction : java final keyword The final keyword present in Java programming language is generally used for restricting the user. …

Read more

C++ Memory Management: new and delete

C++ Memory Management We know that arrays store contiguous and the same type of memory blocks, so memory is allocated …

Read more