I have this function that is supposed to count points but it doesn\'t add them:
def Correct(totalPoints):
print \"Correct\"
totalPoints = totalPoints+1
I think you mix local and global namespaces. If you change your Correct(totalPoints) to this:
def Correct(totalPoints):
return totalPoints + 1
and in your "main code":
print Correct(totalPoints)
to
totalPoints = Correct(totalPoints)
print "You have", totalPoints, "points"
it should work.
Hope this helps!