This is the ending of a GUI quiz. You can choose what quiz you want to do out of a few topics.
Once you have completed a quiz, it tells you the score from that quiz and then you can go back to the main menu and choose a new subject.
The problem is the score adds on to the last one and doesn't reset back to 0.
I have marked the problem line with **.
def EndGame():
global grade
if score == 5:
grade = "A"
elif score == 4:
grade = "B"
elif score == 3:
grade = "C"
elif score == 2:
grade = "D"
elif score == 1:
grade = "E"
elif score == 0:
grade = "F"
def ReturnToMenu():
root12.destroy()
**score = 0**
Start()