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")
5 Respostas
+ 4
We need to see your code, so we can check on it. Please link your code.
+ 4
Also note, that the output strings need to match exactly the ones in the task description.
+ 3
Check your formula and conditions again.. Both wrong according to description..
edit: also "obecity" ; not "obese"
+ 2
Please show your updated code. Without seeing the code, we don't know what you are doing
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")