Computer Science, asked by gaurav1866, 11 months ago

program to enter the your height in centimetres than convert into feet and inches in python ​

Answers

Answered by sushiladevi4418
0

Answer:

Program to enter your height in centimeters then convert into feet and inches using python programming language.

Explanation:

// print height in cm, feet and inches

cm=int(input("Enter the height in centimeters:"))

inches=0.394*cm

feet=0.0328*cm

print("The height in inches",round(inches,2))

print("The height in feet",round(feet,2))

Output:-

Enter the height in centimeters: 153

The height in inches: 60.28

The height in feet: 5.02

Answered by StaceeLichtenstein
0

Following are the program that are mention below .

Explanation:

def convert(ce):   #function

   inch1 = 0.3 * ce   #taking inches

   feet1 = 0.032 * ce   #taking feet

   print ("The Inches is:", round(inch1, 2)) #print in inches  

   print ("The Feet is:", round(feet1, 2))  #print in feet

ce = 10  #taking value of height

convert(ce)  #function call

Following are the description of code :

  • Declared a variable ce and initialized with the 10 and passing them into the function convert(ce).
  • Calling the function convert the control will move the function definition of convert function
  • In this we convert the centimetre into the inch1 and feet1 variable.
  • Finally print the value of inches and feet .

Learn More :

  • https://brainly.in/question/10758161
Similar questions