+ 1
IMC Python
I can't pass this exercise and I don't know why. Can you help me?? Thanks. This is my Code: #tu cĂłdigo va aquĂ x =float(input()) y =float(input()) z = x/y**2 if z < 18.5: print ("Underweight") elif z >=18.5 and z <= 24.9: print ("Normal") elif z >= 25 and z <= 29.9: print ("Overweight") else: print ("Obesity")
2 Answers
+ 1
Can u put the question requirements to can help u ?
+ 1
Fixed It by changing muy Code to this:
#tu cĂłdigo va aquĂ
x =float(input())
y =float(input())
z = round(x/y**2)
if z < 18.5:
print ("Underweight")
elif z >=18.5 and z <= 25:
print ("Normal")
elif z >= 25 and z < 30:
print ("Overweight")
else:
print ("Obesity")