0

what 's wrong w this code?

weight=input() height=input() bmi = float(weight) / float(height)**2 if bmi < 18.5: result ="Underweight" if bmi >= 18.5: elif bmi < 25: result= "Normal" elif bmi >= 25: elif bmi < 30: result ="Overweight" elif bmi > 30: result= "Obesity" print(result)

12th Jul 2021, 6:13 PM
Veritas Vos Liberabit
5 ответов
+ 3
if bmi >= 25:
13th Jul 2021, 1:36 AM
Simba
Simba - avatar
+ 2
you cant put two elif inside each other
12th Jul 2021, 6:25 PM
Jad Yahya
Jad Yahya - avatar
+ 1
The identiation
12th Jul 2021, 9:45 PM
Cmurio
Cmurio - avatar
0
#how about the below? #your code goes here weight=input() height=input() bmi = float(weight) / float(height)**2 if bmi < 18.5: result ="Underweight" if bmi >= 18.5: if bmi < 25: result= "Normal" elif bmi >= 25: if bmi < 30: result ="Overweight" if bmi > 30: result= "Obesity" print(result)
12th Jul 2021, 6:26 PM
Veritas Vos Liberabit
0
indentation of which line?
13th Jul 2021, 12:53 AM
Veritas Vos Liberabit