+ 1
BMI Code
Hello My code doesn't pass the test case 3, Could you help me? #your code goes here weight=int(input()) height=float(input()) BMI=weight/(height*height) if BMI<18.5: print('Underweight') if(BMI>=18.5 and BMI<25): print("Normal") if(BMI>=25 and BMI<30): print('Overheight') if(BMI>=30): print("Obesity")
3 odpowiedzi
+ 3
It is Overweight not Overheight
+ 1
Thanks!!!
0
Even by cleaning a little bit my code, i got the same result
#your code goes here
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('Overheight')
else:
print("Obesity")