I'm trying to make a question and answer quiz game, but I want to make sure that the player is inputting a valid answer and make sure that they cannot move past the question unless they give me a, b, c, or d.
My code so far is like this
for key in questions:
print()
print(key)
for i in options[question_num-1]:
print(i)
guess = ""
while guess != "A" or "B" or "C" or "D":
print("Please input valid answer.")
guess = str.upper(input("What is your answer?: "))
else:
guesses.append(guess)
correct_guesses += check_answer(questions.get(key),guess)
question_num += 1
My thought process is while the guess is not A, B, C, or D, it will keep asking them to input a valid response. However, even when I put in "a", which should automatically change to "A" (which is a valid response), it still keeps me in the while loop. Am I thinking about it wrong or am I messing up somewhere?