I have this function that is supposed to count points but it doesn\'t add them:
def Correct(totalPoints):
print \"Correct\"
totalPoints = totalPoints+1
totalPoints
is passed by value. Which means a new copy is made and that copy is manipulated in the Correct function. Since the modified totalPoints is never returned it is lost. You need something like:
def Correct(totalPoints):
return totalPoints += 1
and call it with
totalPoints = Correct(totalPoints)
The code doesn't show the original totalPoint definition, but that should get you going in the right direction.