BMI calculator help?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

BMI calculator help??

This is my BMI calculator code; W= int(input()) H= float(input()) BMI=(W/(H**2)) if BMI<18.5: print("Underweight") elif BMI>=18.5 and BMI<30.0: print("Normal") elif BMI>30.0: print("Obesity") However, all of the tests pass expect for test three? I’ve tried other methods but test three keeps failing and I don’t understand why. Has anyone else had this issue? Or am I doing something wrong?

24th Jun 2022, 2:03 PM
Reece Davey
1 Answer
+ 2
Sorry guys, didnt read the next question which was to add overweight BMI>25 and BMI<30: add this and the code will pass test 3
24th Jun 2022, 2:09 PM
Reece Davey