+ 2

BMI Calculator

Hi I need help to solve the BMI Calculator Here’s my code. I think everything is fine but the I keep receiving an error h = float(input()) w = float(input()) bmi = w/(h**2) if bmi < 18.5: print ("Underweight") elif 18.5<=bmi<25: print ("Normal") elif 25>bmi<30: print ("Overweight") elif bmi>=30: print ("Obesity")

17th Oct 2022, 1:56 PM
Elias Navarro
5 ответов
+ 1
elif 25 <= bmi < 30 : What is your tried update code?
17th Oct 2022, 2:31 PM
Jayakrishna 🇮🇳
+ 1
First input is weight. Second input is height as per description.. Also Value 25 is not covering..
17th Oct 2022, 2:01 PM
Jayakrishna 🇮🇳
+ 1
Now is corrected but the test case #3 is receivieng an error
17th Oct 2022, 2:24 PM
Elias Navarro
+ 1
Ah thanks I was putting the 25 value backward
17th Oct 2022, 2:40 PM
Elias Navarro
0
2. elif !!!! and other side u can use && ;)
19th Oct 2022, 12:40 PM
Turan Ediz Saçaklı
Turan Ediz Saçaklı - avatar