+ 1

Update

I refined my code (thank to this forum!) and solved case #3. I still don’t know what case #3 was asking, as it is still locked. Can anyone tell me what cases # 4& 5 are asking? #modifiedcode weight = int(input()) height = float(input()) BMI = weight / height**2 if BMI <= 25: print("Underweight") elif BMI >=18.5 and BMI <= 25: print("Normal") elif BMI >= 25 and BMI <=30: print("Overweight") elif BMI >= 30: print("Obesity")

25th May 2022, 9:58 AM
M Heather Fleming
M Heather Fleming - avatar
3 Respostas
+ 3
M Heather Fleming You have a number of problems. If your BMI is less than 18.5, then you are underweight. Which means your 2nd condition needs to be reviewed also. Another problem is that if you have 2 possible outputs for the same condition, which output is correct Example: if BMI == 30, are you overweight or obese. You are close, your syntax is good. Read the task carefully and write the code to suit the task
25th May 2022, 10:21 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 3
25th May 2022, 6:06 PM
Rik Wittkopp
Rik Wittkopp - avatar
+ 1
Thank you!!! This helped! All cases solved :) you’re correct! The answer was in reading the task more carefully. An ‘ah ha’ moment for sure
25th May 2022, 11:00 AM
M Heather Fleming
M Heather Fleming - avatar