Моя программа должна угадывать номер пользователя (от 1 до 8), задавая только 3 вопроса. Он правильно печатает первые два вопроса, но затем, когда я нажимаю клавишу ввода для третьего вопроса, он просто печатает последний вход, который я сделал. Как сделать все входы (да или нет) в нижнем регистре?гадание чисел от 1 до 8
# Simple Expert System
#firstQuestion = prstr(firstQuestion.lower())
print("Think of a number between 1 and 8.")
firstQuestion = (raw_input("Is it an even number? "))
secondQuestion = "Is it less than or equal to 4? "
thirdQuestion = "Is it less than or equal to 3? "
fourthQuestion = "Is it less than 3? "
fifthQuestion = "Is it greater than 6? "
sixthQuestion = "Is it greater than 5? "
seventhQuestion = "Is it less than 2? "
if firstQuestion == "yes":
print(raw_input(secondQuestion))
elif firstQuestion == "no":
print(raw_input(thirdQuestion))
elif secondQuestion == "yes":
print(raw_input(fourthQuestion))
elif secondQuestion == "no":
print(raw_input(fifthQuestion))
elif thirdQuestion == "no":
print(raw_input(sixthQuestion))
elif thirdQuestion == "yes":
print(raw_input(seventhQuestion))
elif fourthQuestion == "yes":
print("Your number is 2")
elif fourthQuestion == "no":
print("Your number is 4")
elif fifthQuestion == "yes":
print("Your number is 8")
elif fifthQuestion == "no":
print("Your number is 6")
elif sixthQuestion == "yes":
print("Your number is 7")
elif sixthQuestion == "no":
print("Your number is 5")
elif seventhQuestion == "yes":
print("Your number is 1")
elif seventhQuestion == "no":
print("Your number is 3")
'elif' означает« еще если » – brianpck
@brianpck и? Почему это не работает? Извините, я довольно новичок в python –