+ 1

I don't know why the second test case said the obesity is wrong,but test 1 said correct for underweight

#your code goes here # BMI CALCULATOR Height_cm = float (input()) Weight_kg = float (input()) BMI = Weight_kg / (Height_cm / 100) ** 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")

21st May 2022, 8:49 AM
David Tosin
David Tosin - avatar
9 Answers
+ 1
Thank you
21st May 2022, 10:35 AM
David Tosin
David Tosin - avatar
+ 1
Please it's still the same problem after I have changed it
21st May 2022, 10:38 AM
David Tosin
David Tosin - avatar
+ 1
Where is your update code..? Save and share link here..
21st May 2022, 2:03 PM
Jayakrishna 🇼🇳
+ 1
Ok
21st May 2022, 9:21 PM
David Tosin
David Tosin - avatar
+ 1
The 1st input is int and the 2nd is float ,to calculat BMI use this formula BMI =the 1st input /the 2nd input **2
22nd May 2022, 8:47 PM
MULUKEN ADDIS
MULUKEN ADDIS - avatar
+ 1
Thank you very much, I've solved it
22nd May 2022, 10:11 PM
David Tosin
David Tosin - avatar
0
# BMI CALCULATOR Weight_kg = float (input()) Height_cm = float (input()) BMI = Weight_kg / (Height_cm / 100) ** 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")
21st May 2022, 9:29 PM
David Tosin
David Tosin - avatar
0
See the farmula again. you may not observed, already told it is BMI = weight / height**2
21st May 2022, 9:33 PM
Jayakrishna 🇼🇳
0
EstĂĄ enfocado muy bien
22nd May 2022, 7:53 PM
Justi Gomez Olaya
Justi Gomez Olaya - avatar