I want to make a timer, so that at the end of the timer, the timer changes the value of 'timerdone'. At the end of my timer, it doesn't change the value.
Example Code:
from time import sleep
timerdone = False
def timer():
print "3"
sleep(1)
print "2"
sleep(1)
print "1"
sleep(1)
timerdone = True
timer()
if timerdone == True:
print "BOOM!"
else:
print "Something wrong."
When I run this in terminal, it prints "Something wrong." instead of "BOOM". I know that I can just make it print "BOOM!" at the end of the timer, but this is just a simpler way of showing my problem.