+ 1
Why isn’t this working? (I’m doing bmi calculator(python))
It just says “line 9 invalid syntax” weight = (int(input())) height = (float(input())) x = weight / height ** 2 if x < 18.5: print ("Underweight") elif x >= 18.5 and x < 25: print ("Normal") elif x >= 25 and x < 30: print ("Overweight") else print ("Obesity")
3 odpowiedzi
+ 2
Rimchi The elif lines are wrongly indented. They should be at the same indentation as the original if statement.