user5554897
user5554897

Reputation:

Quiz isn't working as intended

Keep getting syntax error. I keep getting........ CODE:

answer = "b"
question = "1) Who made the game Grand Theft Auto 5??\nPlease choose from  the following and write a letter: \n◘ A)Viral\n◘ B)Rockstar Games\n◘  C)Madfinger\n◘ D)Gameloft"
print(question)
guess=input().lower()
name=input("Please enter your answer: ")
if guess ==answer:
    print("Correct")
    score = score + 1
    print("Score:")
    print(score)

else:
    print("Wrong")

Upvotes: 0

Views: 34

Answers (1)

Whitefret
Whitefret

Reputation: 1067

You never use name, so why not removing it?

answer = "b"
question = "1) Who made the game Grand Theft Auto 5??\nPlease choose from  the following and write a letter: \n◘ A)Viral\n◘ B)Rockstar Games\n◘  C)Madfinger\n◘ D)Gameloft\n"
print(question)
guess=input("Please enter your answer: ").lower()
if guess ==answer:
    print("Correct")
    score = score + 1
    print("Score:")
    print(score)

else:
    print("Wrong")

Upvotes: 3

Related Questions