0

BMI Calculator

Help! I don't understand why mu formula is not passing test case 3 using the formula below. Any advice? Weight= float(input()) Height= float(input()) BMI = (Weight/(Height**2)) 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 ('Obesity')

6th Jan 2023, 3:38 AM
Sebastien Wilson
Sebastien Wilson - avatar
2 Respostas
+ 4
Your Overweight condition seems wrong. A number cannot be smaller than 25 and larger than 30 at the same time.
6th Jan 2023, 3:54 AM
Tibor Santa
Tibor Santa - avatar
+ 2
Lol thank you so much! I realized my mistake as soon as I posted the question.
6th Jan 2023, 3:57 AM
Sebastien Wilson
Sebastien Wilson - avatar