+ 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
3 ответов
+ 5
Check the condition in your second elif statement.
It should be BMI>= 25
elif BMI >= 25 and BMI <30:
+ 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")
+ 2
Ok