+ 1

Please what is wrong with this code

#your code goes here Height = int(input()) Weight = float(input()) BMI = (Weight)/(Height) **2 if BMI <18.5: print('Underweight') elif BMI >= 18.5 < 25: print('Normal') elif BMI >= 25 < 30: print('overweight') else: print('Obesity')

26th Feb 2022, 6:09 AM
Chukwuka Francisca Makuochukwu
Chukwuka Francisca Makuochukwu - avatar
3 Answers
+ 6
You need to change the input order. Weight, Height Also, "Overweight"
26th Feb 2022, 6:16 AM
Simba
Simba - avatar
+ 1
And your conditions need to be like this 18.5 <= BMI < 25
27th Feb 2022, 9:16 AM
Simba
Simba - avatar
0
I did that... It's still not giving me the correct answer..
27th Feb 2022, 5:00 AM
Chukwuka Francisca Makuochukwu
Chukwuka Francisca Makuochukwu - avatar