0

Bmi- why is this wrong?

weight= int(input()) height = float(input ()) bmi = weight/(height*height) if bmi >18.5 : print("Underweight") elif bmi >=18.5 and bmi <25 : print("Normal") elif bmi >=25 and bmi <30 : print("Overweight") else : print("Obese")

17th Jan 2023, 11:30 AM
Marsh Tree
Marsh Tree - avatar
2 Answers
+ 7
1. Have a look at the task description again it needs to be "Obesity" 2. Check the 1st condition again. bmi is underweight when it is *smaller* than 18.5
17th Jan 2023, 11:36 AM
Lisa
Lisa - avatar
+ 2
My brain thanks you.
17th Jan 2023, 11:48 AM
Marsh Tree
Marsh Tree - avatar