0
How can I output underweight when input is 52 weight and 1.85 height
y = int(input()) y **= 2 if y < 18.5: print ("underweight") elif y >= 18.5 < 30: print ("normal") elif y <= 25 < 30: print ("overweight") elif y >= 30: print ("obesity") #bmi=weight/height² #uw<18.5 #normal=>18.5<30 #overweight<=25<30 #obesity=>30
2 Antworten
+ 1
https://code.sololearn.com/chV1YaLvOQ45/?ref=app
It's in python, right?
0
Hi, Yiga Mark Dan! I think what you mean is:
height = int(input()
weight = int(input()
bmi = weight / (height ** 2)
if bmi < 18.5:
print ("Underweight")
elif bmi < 25:
print("Normal")
elif bmi < 30:
print("Overweight")
else:
print("Obesity")
I think that's it, Yiga Mark Dan.