Help with bmi code acceptance | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Help with bmi code acceptance

I have entered my code in several ways and received the correct outcome, yet, the program will not accept my answer. I have been at this one test for two full days now. Please help weight =int(input()) height =float(input()) bmi = weight/(height*2) if bmi <=18.5: print("Underweight") elif bmi ==18.5: print ("Normal") elif bmi >=18.5: print ("Overweight") elif bmi <=30: print ("Obese")

14th Jul 2022, 1:55 PM
Jazzargo
Jazzargo - avatar
5 Answers
+ 4
We need to see your code, so we can check on it. Please link your code.
14th Jul 2022, 1:58 PM
Lisa
Lisa - avatar
+ 4
Also note, that the output strings need to match exactly the ones in the task description.
14th Jul 2022, 2:14 PM
Lisa
Lisa - avatar
+ 3
Check your formula and conditions again.. Both wrong according to description.. edit: also "obecity" ; not "obese"
14th Jul 2022, 2:10 PM
Jayakrishna 🇮🇳
+ 2
Please show your updated code. Without seeing the code, we don't know what you are doing
15th Jul 2022, 1:31 PM
Lisa
Lisa - avatar
0
I have checked everything. If I add anything I get syntax errors. 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 ("Overweight") elif bmi >30: print ("Obecity")
15th Jul 2022, 1:18 PM
Jazzargo
Jazzargo - avatar