def show(): print "balance currently:", balance def deposit(amount): global balance print "deposit:", amount balance = balance + amount def withdraw(amount): global balance print "withdraw:", amount balance = balance - amount balance = 0 deposit(3) show() deposit(5) show() withdraw(2) show() ============ >>> deposit: 3 balance currently: 3 deposit: 5 balance currently: 8 withdraw: 2 balance currently: 6 >>>