asked 203k views
2 votes
7.2.5 Height in Meters codehs

1 Answer

5 votes

Answer:

INCHES_TO_CM = 2.54

CM_TO_METERS = 0.01

FEET_TO_INCHES = 12

def convert_height_to_meter(feet, inches):

inches_total = (feet * FEET_TO_INCHES) + inches

cm_total = inches_total * INCHES_TO_CM

meters = cm_total * CM_TO_METERS

print(str(feet)+" feet, "+str(inches)+" inches is "+str(meters)+" meters")

convert_height_to_meter(6, 4)

convert_height_to_meter(5, 8)

convert_height_to_meter(5, 2)

answered
User Arek
by
8.9k points

Related questions

asked Oct 16, 2024 145k views
Galatians asked Oct 16, 2024
by Galatians
8.4k points
1 answer
2 votes
145k views
1 answer
4 votes
5.1k views