我的程序需要通过只询问3个问题来猜测用户的号码(从1到8).它正确地打印了前两个问题,但是当我按Enter键进入第三个问题时,它只打印我做的最后一个输入.如何使所有输入(是或否)小写?
# 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 …Run Code Online (Sandbox Code Playgroud)