+ 1

BMI Code

Hello My code doesn't pass the test case 3, Could you help me? #your code goes here weight=int(input()) height=float(input()) BMI=weight/(height*height) if BMI<18.5: print('Underweight') if(BMI>=18.5 and BMI<25): print("Normal") if(BMI>=25 and BMI<30): print('Overheight') if(BMI>=30): print("Obesity")

4th Dec 2021, 7:49 PM
Jeremy Thevenin
Jeremy Thevenin - avatar
3 odpowiedzi
+ 3
It is Overweight not Overheight
4th Dec 2021, 8:09 PM
PanicS
PanicS - avatar
+ 1
Thanks!!!
4th Dec 2021, 8:13 PM
Jeremy Thevenin
Jeremy Thevenin - avatar
0
Even by cleaning a little bit my code, i got the same result #your code goes here weight=int(input()) height=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('Overheight') else: print("Obesity")
4th Dec 2021, 8:06 PM
Jeremy Thevenin
Jeremy Thevenin - avatar