## 03-Score_Variable_incrementing.py

Sign up Free. Don't forget to check out our challenges, lessons, solve and learn series and more ...

## Code Snippet

``````import sys
#Create a Main Menu Welcome screen: 1. P to Play Quiz 2. A - About the Quiz  3. Q to Quit
#Complete as many questions as you can, creating the pathway through the quiz

global score
score=0

choice = input("""
A: Press A to find out more about the Quiz
P: Press P to play the Quiz
Q: Press Q to Quit the program

if choice == "A" or choice =="a":
elif choice == "p" or choice =="P":
quiz(score)
elif choice == "Q" or choice =="q":
quit()
else:
print("You must only select either A,P or Q.")

def quiz(score):
print("*****WELCOME TO THE QUIZ***************")
score=0
print("********************************************************************************")
answer1=input("Question 1: What is the last book of the Bible that also talks about the end of the world?")
print("Correct")
score=score+1
question2(score)
else:
print("Sorry, not quite!")
score=score-1
quiz(score)

def question2(score):
print("Correct")
score=score+1
question3(score)
else:
print("Sorry, back to the start for you!")
quiz(score)

def question3(score):
answer2=input("The whole old testament is really leading up to the coming of ......?")
print("Correct")
score=score+1

print("And that's it.....well done! You're done")
sys.exit()
else:
print("Sorry, back to the start for you!")
quiz(score)