Question: # Proj 4 _ Q 2 _ Carpenter.py # A program to convert the student's BMI. # By: Melissa Carpenter # Function to convert height

# Proj4_Q2_Carpenter.py
# A program to convert the student's BMI.
# By: Melissa Carpenter
# Function to convert height from feet and inches to inches
def heightToInches(feet, inches):
height_inches = feet*12+ inches
return height_inches
# Function to calculate BMI
def calculateBMI(height_inches, weight):
bmi =(weight *720)/(height_inches **2)
return bmi
def main():
feet = float(input("Input your height(in feet)?: "))
inches = float(input("Input your height(in inches)?: "))
# Finding height and weight
height = h_i +(h_f*12)
weight = float(input("Input your weight(in pounds): "))
# Calling BMI
bmiVal =(weight *702)/(height * height)
# Printing BMI
print("
BMI: "+ str(bmiVal)+"
")
# Evaluating BMI
if bmiVal <18.5: print("You are below the healthy BMI range.")
elif bmiVal >=19.0 and bmiVal <=24.9: print("Congratulations! You have a healthy BMI.")
elif bmiVal >=25.0 and bmiVal <=29.9: print("You are above the healthy BMI range.")
else: print("You are obese!")
main()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!