+ 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 Antworten
+ 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")