There is an issue in the below code that I can't figure out. Whatever answer I give, it only shows correct answer. I've debugged but cannot find the solution. Can anyone please help me? And also there are some modules used: 1) pyttsx3, SpeechRecognition, Wikipedia, Random
elif "quiz" in query:
executed1 = 0
executed2 = 0
executed3 = 0
executed4 = 0
executed5 = 0
correct = 0
q = 0
while q < 5:
quiz = random.randint(1, 5)
if quiz == 1:
if executed1 == 1:
pass
else:
print("Question) Who discovered The United States of America?")
speak("Question) Who discovered The United States of America?")
trivia()
if 'Christopher Columbus' or 'christopher columubus' == query:
speak("Correct Answer!")
correct += 1
executed1 = 1
else:
print("Wrong Answer!")
speak("Wrong Answer")
executed1 = 1
q += 1
elif quiz == 2:
if executed2 == 1:
pass
else:
print("Question) Which nation was the first to go in space?")
speak("Question) Which nation was the first to go in space?")
trivia()
if "Russia" or 'russia' == query:
print("Correct Answer")
speak("Correct Answer!")
correct += 1
executed2 = 1
else:
print("Wrong Answer!")
speak("Wrong Answer!")
executed2 = 1
q += 1