+ 1
Python BMI calculator exercise
Hi, someone knows why this BMI calculator is wrong? Four of the five test case results give well less one that is hidden, I can't find the error: weight = int(input()) height = float(input()) BMI = weight / height ** 2 if BMI < 18.5: print("Underweight") elif BMI >= 18.5 and BMI <= 24.9: print("Normal") elif BMI >= 25 and BMI <= 29.9: print("Overweight") elif BMI >= 30: print("Obesity")
2 Answers
+ 2
Shouldn't <= 24.9 not be < 25.
And <= 29.9 not be < 30
+ 1
You are right, thank you!