Apr 03, 2017 I think you are using 'global' incorrectly. See Python reference. You should declare variable without global and then inside the function when you want to access global variable you declare it global yourvar. # ! usrbinpython total def checkTotal(): global total total 0