+ 1
Hello. Can you help me identify what's wrong in my code? I tried using elif but it also doesn't work.
THIS IS FOR THE BMI CALCULATOR. This code prints correct during 1st test case which is the Underweight but outputs "No output" during the second test case which is the Obesity. x = int(input()) #weight y = float(input()) #height z = x/y**2 if (z < 18.5): print("Underweight") if ((z >= 18.5) and (z < 25)): print("Normal") if ((z >= 25) and (z < 30)): print("Overweight") if (z >= 30): print("Obesity")
2 Respuestas
+ 2
visph okay I'll try editing my code. Thank you for your response! Happy coding and learning!
0
if condition1:
# statements
elif condition2:
# statements
elif ...