I'm doing an assignment where I have to conduct a quiz for different topics. This is my code so far.
print("Hello and welcome to Shahaad's quiz!") #Introduction
name = input("What is your name? ")
print("Alright", name,", these will be today's topics:")
print("a) Video Games")
print("b) Soccer")
print("c) Geography")
choice = input("Which topic would you like to begin with?")
if choice == 'video games' or choice == 'Video Games' or choice == 'Video games' or choice == 'a)':
print("You picked Video Games.")
print("Question number one:")
print("What is the most popular FPS (First Person Shooter) game?")
print("a) Call of Duty")
print("b) Battlefield")
print("c) Grand Theft Auto 5")
print("d) Counter Strike")
answer = input("Your answer:")
guessesTaken = 0
if answer == 'Call Of Duty' or answer == 'Call of duty' or answer == 'Call of duty' or answer == 'a)' or answer == 'call of duty':
print("You are correct!")
else:
guessesTaken = guessesTaken + 1
print("Incorrect!")
print("You have", guessesTaken, "guess left!")
I am trying to make it so that if they get the answer wrong, they get another chance at answering the question. Right now once they get it wrong, they can't type again. Thanks!