How many Centimeters in a Foot through Python

By | October 3, 2021
Centimeters in a Foot through Python

Here we have provided a Program in Python which can tell how many centimeters are there in the user entered a number (in feet).

The program asks the user to enter feet and in return, the program tells the user how many centimeters are in that feet. This would be feet to centimeters converter.

Vamware

Python:

try:
    feet = int(input("Enter Feet: "))
    cm = feet*30.48
    print("There are "+str(cm)+"cms in "+str(feet)+" feet" )
except:
    print("Enter a valid number for feet")

Output:

Enter Feet: 20
There are 609.6cms in 20 feet

People are also reading:

Leave a Reply

Your email address will not be published. Required fields are marked *