I\'m getting the error: UnboundLocalError: local variable \'t\' referenced before assignment When I\'m performing the equation t = t + tc in a function
UnboundLocalError: local variable \'t\' referenced before assignment
t = t + tc
global works per function - so you have to mark the variable as global on every function you use it.
global