почему не работает несколько elif в python
я делаю программу для того, чтобы узнать свой ИМТ вот код:
print(
"For women: Ideal weight = Height (in centimeters) - 110. For men: Ideal weight = Height (in centimeters) - 100."
)
x = 16, 17, 18
restart = True
while restart:
male = input("Enter your male: ")
if male.upper() == "MALE":
weight = float(input("Enter your weight: "))
height = float(input("Enter your height: "))
height *= height
weight /= height
print(weight)
if weight <= 16:
print("You are severely underweight")#вот этот работает? а все другие нет
elif weight == 16 or 17 or 18:
print("You are underweight (deficit)")
elif weight == 19 or 20 or 21 or 22 or 23 or 24 or 25:
print("You have a normal weight")
elif weight == 26 or 27 or 28 or 29 or 30:
print("You are overweight (pre-obesity condition)")
elif weight == 31 or 32 or 33 or 34 or 35:
print("you have obesity of the 1st degree")
if male.upper() == "FEMALE":
weight = float(input("Enter your weight: "))
height = float(input("Enter your height: "))
height *= height
weight /= height
print(weight)
и как раз первый elif рвботает, а все остальные нет, что делать?