+ 1
Help me please I'm not getting the output
weight=float(input()) height=float(input()) bmi=weight/(height*height) print("bmi:",bmi) if(bmi<18.5): print("underweigtht") elif(bmi>=18.5 and bmi<25): print("normal") elif(bmi>25 and bmi<30): print("overweight") else: print("obesity")
3 Answers
+ 3
weight=float(input())
height=float(input())
bmi=weight/(height**2)
#we have to use ** operator instead of * since it has higher precedence than /.
#print("bmi:",bmi)
#It's not necessary to add extra prompt messages in our solutions.
#First letter of variables is in upper case
if(bmi<18.5):
print("Underweight")
elif(bmi>=18.5 and bmi<25):
print("Normal")
elif(bmi>25 and bmi<30):
print("Overweight")
else:
print("Obesity")
0
I'm getting the output but it is again showing the expected output