Syntax Error


#1

Help my code is not working its telling me there is a Syntax Error and highlighting the last bracket after "Madrid"

It is supposed to run the quiz and tell you your score

question_set1=(("What is the capital of France","Paris"),"What is the capital of Australia","Canaberra"),"What is the capital of Spain","Madrid"))
Score=0

for x in Question_set1:
print(x [0])
answer =str(input("answer: "))
answer =answer.lower()
if answer == x[1]:
print("That is correct")
score = score+1
print("Your score is",score)

`


#2

The number of parentheses don't match...

(("What is the capital of France","Paris"),\
("What is the capital of Australia","Canaberra"),\
("What is the capital of Spain","Madrid"))

#3

Use the preformatted text option (ctrl+shift+C) so it makes it easier for others to copy paste your code next time.

question_set1=(("What is the capital of France","Paris"),
               ("What is the capital of Australia","Canaberra"),
               ("What is the capital of Spain","Madrid"))
Score=0

for x in question_set1:
    print x[0]
    answer = str(raw_input("answer: "))
    answer_lower = answer.title()
    if answer == x[1] or answer_lower == x[1]:
        print("That is correct")
        Score += 1
    print "Your score is", Score

#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.