Python Forum
Issue with program not passing to other elif condition
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Issue with program not passing to other elif condition
#3
if BMI<=18.4:
print('You are underweight')
elif BMI>=18.5 or BMI<=24.9:  # These should be 'and', not 'or'
print(' You have Normal weight')
elif BMI >=25 or BMI<=29.9: # And if I am 24.937?  No.  <= 18.4; >18.4 and < 25; >= 25 and < 30 
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')
Reply


Messages In This Thread
RE: Issue with program not passing to other elif condition - by supuflounder - Nov-18-2021, 10:00 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python Alteryx QS-Passing pandas dataframe column inside SQL query where condition sanky1990 0 1,472 Dec-04-2023, 09:48 PM
Last Post: sanky1990
  else condition not called when if condition is false Sandz1286 10 8,226 Jun-05-2020, 05:01 PM
Last Post: ebolisa
  [HELP] Nested conditional? double condition followed by another condition. penahuse 25 12,406 Jun-01-2020, 06:00 PM
Last Post: penahuse
  How to write a script to execute a program need passing additional input? larkypython 2 3,336 Nov-23-2019, 04:38 AM
Last Post: larkypython
  Whats the right way to refactor this Big if/elif/elif ? pitosalas 1 2,986 Jul-28-2019, 05:52 PM
Last Post: ichabod801
  Facing issue with pyautogui program after PC upgrade Utkarsh29 2 4,048 Jul-15-2019, 05:20 PM
Last Post: Utkarsh29
  if else condition issue mmaz67 4 3,957 Jul-18-2018, 09:02 AM
Last Post: gontajones
  input issue elif jge047 2 4,024 Nov-23-2017, 06:29 AM
Last Post: zykbee
  leap year program issue jashajmera 3 4,867 Feb-04-2017, 11:51 AM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020