+ 1
BMI calculator not working
Hello, guys! I am a beginner Python student and I'm stuck with this. It doesn't work. :-((( height = float(input()) weight = 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") elif ( bmi >=30): print("obesity") Can you help me? Thank you!
2 Answers
+ 7
Please check the strings in print(): They must be exactly the same as in the task instruction
0
bmi = float(input())/float(input())**2
if bmi<18.5:print('Underweight')
elif 25>bmi>=18.5:print('Normal')
elif 30>bmi>=25:print('OverWeight')
elif bmi>=30:print('Obesity')