0
What what is wrong with my code?
#your code goes here weight = (int(input())) height = (float(input())) weight_height = float(weight * height**2) while True: if weight_height < 18.5: print ("Underweight") elif weight_height >= 18.5 and weight_height < 25: print ("Normal") elif weight_height >= 25 and weight_height < 30: print ("Overweight") else print ("Obesity")
2 Answers
+ 2
It should be weight/height**2 not weight*height**2
Also remove the while true condition.
+ 1
Indent code under the while statement and add a colon after the else statement.