Reminders:
def example(): x = 10 # local variable return x print(example()) # print(x) # ERROR: x not defined here
y = 5 def show(): return y print(show()) # 5
z = 100 def shadow(): z = 50 # local z return z print(shadow()) # 50 print(z) # 100
global
count = 0 def bad(): global count count += 1 bad() print(count) # 1
Write a function counter(n) that takes a number and returns it increased by 1.
counter(n)