提前感谢任何帮助过的人。
我正在使用此代码来验证我正在编写的程序的用户输入,但用户输入永远不会满足 WHILE 循环,我无法理解原因。
User_Answer = input('Which is the correct answer A,B,C or D?' ).upper()
#Ask user which they believe correct and save it as variable with the identifier User_Answer
while User_Answer != 'A' and User_Answer !='B' and User_Answer !='C' and User_Answer !='D':
User_Answer = input('Which is the correct answer A,B,C or D?' ).upper()
# Is user entry valid in the form of A,B,C or D and re-asks question if not.
else:
do something