Nov-18-2021, 09:27 AM
Hello
I am new to this forum and programming in general.
I am trying to create BMI calculator. the issue is that no matter what I do the program stops only on the first elif statement (>=18.5 to >=24.9), even if the BMI is higher
code:
I am new to this forum and programming in general.
I am trying to create BMI calculator. the issue is that no matter what I do the program stops only on the first elif statement (>=18.5 to >=24.9), even if the BMI is higher
code:
print('enter you weight kg') weight=float(input()) print('enter you height meter') height=float(input()) BMI=(weight/height**2) print(BMI) if BMI<=18.4: print('You are underweight') elif BMI>=18.5 or BMI<=24.9: print(' You have Normal weight') elif BMI >=25 or BMI<=29.9: print('You are overweight') elif BMI>=30 or BMI<=34.9: print('You are moderately obese') elif BMI >=35 or BMI<=39.9: print('You are severely obese') elif BMI>=40: print('You are very severely obese')Thank you