question archive Formula for body mass index (BMI): BMI = weight/height times 703 Write a Python Program that asks the user for weight and height and then displays weight class based on BMI (use the table below for this)

Formula for body mass index (BMI): BMI = weight/height times 703 Write a Python Program that asks the user for weight and height and then displays weight class based on BMI (use the table below for this)

Subject:Computer SciencePrice:2.85 Bought3

Formula for body mass index (BMI): BMI = weight/height times 703 Write a Python Program that asks the user for weight and height and then displays weight class based on BMI (use the table below for this).

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE

Answer Preview

# define functions
def bmi(weight, height):
  
   return (weight*703)/(height*height)
# take input from the user
print("BMI calculate")
weight = int(input("Enter weight: "))

height = int(input("Enter height: "))

bmi = bmi(weight,height))
if bmi < '18.5':
   print("underweight")

elif bmi >= '18.5' && bmi < '24.9':
   print("normal")

elif bmi >= '25.0' && bmi < '29.9':
   print("overweight")
elif bmi >= '30.0':
   print("Very overweight")