Python program to convert cm to feet and inches; Through this tutorial, i am going to show you how to convert cm to feet and inches in python.
In this tutorial, i will write some python programs to convert a human height given in feet and inches to centimeters.
Python Program to Convert cm to Feet and Inches
- Write a python program to convert height centimeters to inches
- Write a python program to convert height centimeters to feet
Write a python program to convert height centimeters to inches
#take input from user cm=int(input("Enter the height in centimeters:")) #convert centimeter to inche inches=0.394*cm #print result print("The length in inches",round(inches,2))
Output
Enter the height in centimeters: 167 The length in inches 65.8
Write a python program to convert height centimeters to feet
#take input from user cm=int(input("Enter the height in centimeters:")) #convert centimeter to feet feet=0.0328*cm #print result print("The length in feet",round(feet,2))
Output
Enter the height in centimeters: 167 The length in feet 5.48
Recommended Python Tutorials
Recommended:-Python Program to Find Largest of n Numbers
Recommended:-Python Program to Find Power of Number
Recommended:-Python Program to Print Prime Number From 1 to N
Recommended:-Python Program to Find Square Root of Number
Recommended:-Python Program to Find Cube of Number
Recommended:-Python Palindrome Program
Recommended:-Python Program to Count Set Bits in a Number
Recommended:-Python Program for BMI Calculation
Recommended:-Python Program to Find Out Absolute Value
Recommended:-Python Random Number Generator Code
Recommended:-Python program for Zip, Zap and Zoom game
Recommended:-Python Program to Swap Two Numbers
Recommended:-Python Program to Find n-th term of Fibonacci Series
Recommended:-Python Program For Calculator
Be First to Comment