I am really struggling to find the error with the python code i have created for my a-level computer science class. Any help would be appreciated. (Using version 3.5)
import time
print("Quiz time!")
print()
time.sleep(1)
print("Question 1")
time.sleep(1)
q1=input("What is the capital city of France?:")
if q1 == "Paris" :
"answer1"==1
print("Correct! ")
elif q1 == "paris" :
"answer1"==1
print("Correct! ")
else:
"answer1"==0
print("Incorrect ")
print()
time.sleep(1)
print("Question 2")
time.sleep(1)
q2=input("Jeremy Clarkson and his team were recently fired but where will their new show be streamed:")
if q2 == "Amazon":
"answer2"==1
print("Correct! ")
elif q2 == "amazon":
"answer2"==1
print("Correct! ")
elif q2 == "Amazon Prime":
"answer2"==1
print("Correct! ")
elif q2 == "Amazon prime":
"answer2"==1
print("Correct! ")
elif q2 == "amazon prime":
"answer2"==1
print("Correct! ")
else:
"answer2"==0
print("Incorrect ")
print()
time.sleep(1)
print("Question 3")
time.sleep(1)
q3=input("What is the longest river in the world?:")
if q3 == "Nile":
"answer3"==1
print("Correct! ")
elif q3 == "nile":
"answer3"==1
print("Correct! ")
elif q3 == "The River Nile":
"answer3"==1
print("Correct! ")
elif q3 == "the river nile":
"answer3"==1
print("Correct! ")
elif q3 == "The river nile":
"answer3"==1
print("Correct! ")
elif q3 == "the River Nile":
"answer3"==1
print("Correct! ")
elif q3 == "River Nile":
"answer3"==1
print("Correct! ")
elif q3 == "River nile":
"answer3"==1
print("Correct! ")
elif q3 == "river nile":
"answer3"==1
print("Correct! ")
else:
"answer3"==0
print("Incorrect ")
print()
time.sleep(1)
print("Question 4")
time.sleep(1)
q4=input("What job does Homer Simpson do at the Springfield Nuclear Power Plant?:")
if q4 == "Safety Inspector":
"answer4"==1
print("Correct! ")
elif q4 == "safety inspector":
"answer4"==1
print("Correct! ")
elif q4 == "Safety inspector":
"answer4"==1
print("Correct! ")
elif q4 == "saftey inspector":
"answer4"==1
print("Correct! ")
else:
"answer4"==0
print("Incorrect ")
print()
time.sleep(1)
print("Question 5")
time.sleep(1)
q5=input("What building is located on Pennsylvania Avenue:")
if q5 == "White House":
"answer5"==1
print("Correct! ")
elif q5 == "white house":
"answer5"==1
print("Correct! ")
elif q5 == "White house":
"answer5"==1
print("Correct! ")
elif q5 == "The White House":
"answer5"==1
print("Correct! ")
elif q5 == "The white house":
"answer5"==1
print("Correct! ")
elif q5 == "the white house":
"answer5"==1
print("Correct! ")
else:
"answer5"==0
print("Incorrect ")
print()
time.sleep(1)
print("Question 6")
time.sleep(1)
q6=input("The invasion of which country by Nazi Germany sparked WW2:")
if q6 == "Poland":
"answer6"==1
print("Correct! ")
elif q6 == "poland":
"answer6"==1
print("Correct! ")
else:
"answer6"==0
print("Incorrect ")
print()
time.sleep(1)
print("Question 7")
time.sleep(1)
q7=input("Which adult orientated cartoon is based around a burger resturaunt?:")
if q7 == "Bobs Burgers":
"answer7"==1
print("Correct! ")
elif q7 == "Bobs burgers":
"answer7"==1
print("Correct! ")
elif q7 == "bobs burgers":
"answer7"==1
print("Correct! ")
elif q7 == "Bob's Burgers":
"answer7"==1
print("Correct! ")
elif q7 == "Bob's burgers":
"answer7"==1
print("Correct! ")
elif q7 == "bob's burgers":
"answer7"==1
print("Correct! ")
else:
"answer7"==0
print("Incorrect ")
print()
time.sleep(1)
print("Question 8")
time.sleep(1)
q8=input("How old is the queen:")
if q8 == "90":
"answer8"==1
print("Correct! ")
else:
"answer8"==0
print("Incorrect ")
print()
time.sleep(1)
print("Question 9")
time.sleep(1)
q9=input("In which year was netflix founded?:")
if q9 == "1997":
"answer9"==1
print("Correct! ")
elif q9 == "97":
"answer9"==1
print("Correct! ")
else:
"answer9"==0
print("Incorrect ")
print()
time.sleep(1)
print("Question 10")
time.sleep(1)
q10=input("What was the Snickers chocolate bar origionally called?:")
if q10 == "marathon":
"answer0"==1
print("Correct! ")
elif q10 == "Marathon":
"answer0"==1
print("Correct! ")
elif q10 == "marathon bar":
"answer0"==1
print("Correct! ")
elif q10 == "Marathon bar":
"answer0"==1
print("Correct! ")
elif q10 == "Marathon Bar":
"answer0"==1
print("Correct! ")
else:
"answer0"==0
print("Incorrect ")
print()
time.sleep(1)
sum=int("answer1"+"answer2"+"answer3"+"answer4"+"answer5"+"answer6"+"answer7"+"answer8"+"answer9"+"answer0")
print("You scored",sum)
if "answer1" == 0:
print("The capital of France is Paris")
if "answer2" == 0:
print("The Grand tour staring the trio streams on Amazon Prime in November")
if "answer3" == 0:
print("The Nile is the worlds largest river")
if "answer4" == 0:
print("Homer works as a Safety Inspector")
if "answer5" == 0:
print("The White House is located on Pennsylvania Avenue")
if "answer6" == 0:
print("The Nazi and Soviet invasion of Poland started WW2")
if "answer7" == 0:
print("Bobs Burgers is based in the resturaunt Bobs Burgers")
if "answer8" == 0:
print("The queen recently turned 90 and had a televised celebration hosted by Ant & Dec")
if "answer9" == 0:
print("Netflix was founded in august of 1997")
if "answer0" == 0:
print("Before being renamed Snickers the nutty bar was originally called a Marathon Bar")
time.sleep(1)
print()
time.sleep(1)
print("Thank you for playing")
import time
print("Quiz time!")
print()
time.sleep(1)
print("Question 1")
time.sleep(1)
q1=input("What is the capital city of France?:")
if q1 == "Paris" :
"answer1"==1
print("Correct! ")
elif q1 == "paris" :
"answer1"==1
print("Correct! ")
else:
"answer1"==0
print("Incorrect ")
print()
time.sleep(1)
print("Question 2")
time.sleep(1)
q2=input("Jeremy Clarkson and his team were recently fired but where will their new show be streamed:")
if q2 == "Amazon":
"answer2"==1
print("Correct! ")
elif q2 == "amazon":
"answer2"==1
print("Correct! ")
elif q2 == "Amazon Prime":
"answer2"==1
print("Correct! ")
elif q2 == "Amazon prime":
"answer2"==1
print("Correct! ")
elif q2 == "amazon prime":
"answer2"==1
print("Correct! ")
else:
"answer2"==0
print("Incorrect ")
print()
time.sleep(1)
print("Question 3")
time.sleep(1)
q3=input("What is the longest river in the world?:")
if q3 == "Nile":
"answer3"==1
print("Correct! ")
elif q3 == "nile":
"answer3"==1
print("Correct! ")
elif q3 == "The River Nile":
"answer3"==1
print("Correct! ")
elif q3 == "the river nile":
"answer3"==1
print("Correct! ")
elif q3 == "The river nile":
"answer3"==1
print("Correct! ")
elif q3 == "the River Nile":
"answer3"==1
print("Correct! ")
elif q3 == "River Nile":
"answer3"==1
print("Correct! ")
elif q3 == "River nile":
"answer3"==1
print("Correct! ")
elif q3 == "river nile":
"answer3"==1
print("Correct! ")
else:
"answer3"==0
print("Incorrect ")
print()
time.sleep(1)
print("Question 4")
time.sleep(1)
q4=input("What job does Homer Simpson do at the Springfield Nuclear Power Plant?:")
if q4 == "Safety Inspector":
"answer4"==1
print("Correct! ")
elif q4 == "safety inspector":
"answer4"==1
print("Correct! ")
elif q4 == "Safety inspector":
"answer4"==1
print("Correct! ")
elif q4 == "saftey inspector":
"answer4"==1
print("Correct! ")
else:
"answer4"==0
print("Incorrect ")
print()
time.sleep(1)
print("Question 5")
time.sleep(1)
q5=input("What building is located on Pennsylvania Avenue:")
if q5 == "White House":
"answer5"==1
print("Correct! ")
elif q5 == "white house":
"answer5"==1
print("Correct! ")
elif q5 == "White house":
"answer5"==1
print("Correct! ")
elif q5 == "The White House":
"answer5"==1
print("Correct! ")
elif q5 == "The white house":
"answer5"==1
print("Correct! ")
elif q5 == "the white house":
"answer5"==1
print("Correct! ")
else:
"answer5"==0
print("Incorrect ")
print()
time.sleep(1)
print("Question 6")
time.sleep(1)
q6=input("The invasion of which country by Nazi Germany sparked WW2:")
if q6 == "Poland":
"answer6"==1
print("Correct! ")
elif q6 == "poland":
"answer6"==1
print("Correct! ")
else:
"answer6"==0
print("Incorrect ")
print()
time.sleep(1)
print("Question 7")
time.sleep(1)
q7=input("Which adult orientated cartoon is based around a burger resturaunt?:")
if q7 == "Bobs Burgers":
"answer7"==1
print("Correct! ")
elif q7 == "Bobs burgers":
"answer7"==1
print("Correct! ")
elif q7 == "bobs burgers":
"answer7"==1
print("Correct! ")
elif q7 == "Bob's Burgers":
"answer7"==1
print("Correct! ")
elif q7 == "Bob's burgers":
"answer7"==1
print("Correct! ")
elif q7 == "bob's burgers":
"answer7"==1
print("Correct! ")
else:
"answer7"==0
print("Incorrect ")
print()
time.sleep(1)
print("Question 8")
time.sleep(1)
q8=input("How old is the queen:")
if q8 == "90":
"answer8"==1
print("Correct! ")
else:
"answer8"==0
print("Incorrect ")
print()
time.sleep(1)
print("Question 9")
time.sleep(1)
q9=input("In which year was netflix founded?:")
if q9 == "1997":
"answer9"==1
print("Correct! ")
elif q9 == "97":
"answer9"==1
print("Correct! ")
else:
"answer9"==0
print("Incorrect ")
print()
time.sleep(1)
print("Question 10")
time.sleep(1)
q10=input("What was the Snickers chocolate bar origionally called?:")
if q10 == "marathon":
"answer0"==1
print("Correct! ")
elif q10 == "Marathon":
"answer0"==1
print("Correct! ")
elif q10 == "marathon bar":
"answer0"==1
print("Correct! ")
elif q10 == "Marathon bar":
"answer0"==1
print("Correct! ")
elif q10 == "Marathon Bar":
"answer0"==1
print("Correct! ")
else:
"answer0"==0
print("Incorrect ")
print()
time.sleep(1)
sum=int("answer1"+"answer2"+"answer3"+"answer4"+"answer5"+"answer6"+"answer7"+"answer8"+"answer9"+"answer0")
print("You scored",sum)
if "answer1" == 0:
print("The capital of France is Paris")
if "answer2" == 0:
print("The Grand tour staring the trio streams on Amazon Prime in November")
if "answer3" == 0:
print("The Nile is the worlds largest river")
if "answer4" == 0:
print("Homer works as a Safety Inspector")
if "answer5" == 0:
print("The White House is located on Pennsylvania Avenue")
if "answer6" == 0:
print("The Nazi and Soviet invasion of Poland started WW2")
if "answer7" == 0:
print("Bobs Burgers is based in the resturaunt Bobs Burgers")
if "answer8" == 0:
print("The queen recently turned 90 and had a televised celebration hosted by Ant & Dec")
if "answer9" == 0:
print("Netflix was founded in august of 1997")
if "answer0" == 0:
print("Before being renamed Snickers the nutty bar was originally called a Marathon Bar")
time.sleep(1)
print()
time.sleep(1)
print("Thank you for playing")