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

9th Mar 2021, 11:32 PM
The Wild adventures of Abraham
The Wild adventures of Abraham - avatar
2 Answers
+ 2
It should be weight/height**2 not weight*height**2 Also remove the while true condition.
10th Mar 2021, 1:34 AM
Simba
Simba - avatar
+ 1
Indent code under the while statement and add a colon after the else statement.
9th Mar 2021, 11:56 PM
Ryan
Ryan - avatar