0
why is this wrong, i have been trying to figure it out for 2 days.(26 in the python course)
x = input() y = input() z = (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") elif (z >= 30): print ("Obesity")
2 Réponses
+ 4
Use x= float(input())
y=float(input())
+ 3
I am not sure about the exact breaking points for the classification, but for now you are taking input as string, not as a numeric type.
Prefix the calls to input() with a float() for conversion: x = float(input())