Height=float(input()) Weight=float(input()) BMI = Height/Weight**2 if BMI<18.5: print("Underweight") elif BMI>=18 and BMI<25 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Height=float(input()) Weight=float(input()) BMI = Height/Weight**2 if BMI<18.5: print("Underweight") elif BMI>=18 and BMI<25

Anyone tell me what I am missing

31st Mar 2021, 2:25 AM
ANURAG SINGARI
3 Answers
+ 5
Check the condition in your second elif statement. It should be BMI>= 25 elif BMI >= 25 and BMI <30:
31st Mar 2021, 2:42 AM
Simba
Simba - avatar
+ 2
Weight=float(input()) Height=float(input()) BMI = Weight/Height**2 if BMI<18.5: print("Underweight") elif BMI>=18 and BMI<25: print("Normal") elif BMI<=25 and BMI<30: print("Overweight") elif BMI>=30: print("Obesity")
31st Mar 2021, 2:37 AM
ANURAG SINGARI
+ 2
Ok
31st Mar 2021, 2:43 AM
ANURAG SINGARI