0
weight= int(input()) height=int(input()) BMI=weight/height*height if BMI<18.5: print("Underweight") elif BMI >=18.5 and <25: p
plz explain where is the bug
10 Answers
+ 4
Edit your question, you will see + icon on the left hand side from there you can add code or post!
Happy Coding đ
+ 3
CH. Hemant Kumar Reddy your welcome
+ 2
Please post your code as a code not text so that other users can work on it and give you a solution. đ€đ»
+ 2
btw here is the correction
weight = int(input())
height = float(input())
res = weight / height**2
if res < 18.5:
print("Underweight")
elif res >= 18.5 and res < 25:
print("Normal")
elif res >= 25 and res < 30:
print("Overweight")
elif res >= 30:
print("Obesity")
height should be float and do give the spaces (indents) properly
+ 2
#Sharique Khan for your valuable information
+ 1
I don't know how post as codeđ
+ 1
damn, don't put your code on the title of your question.
+ 1
Coding Kitty[exams] I don't know how to post my question, just posted questionđđ€
+ 1
I think this code can help you.
weight=int(input())
height=float(input())
IBM=weight/(height)**2
height==0
while True:
break
if IBM<18.5:
print("Underweight")
elif 18.5<=IBM and IBM<25:
print("Normal")
elif IBM>=25 and IBM<30:
print("Overweight")
else:
print("Obesity")
+ 1
The problem is that the expression after your "and" lacks a relation. So it only says smaller than 25. But it is not stated what should be smaller than 25. You can skip the "and" totally by writing 18.5 <=bmi <25: