counter = 0
def increment():
# adjust code here...
counter += 1
increment()
print(counter) # expected: 1
increment()
print(counter) # expected: 2
Python
Setting up Python environment...
Output
counter = 0
def increment():
# adjust code here...
counter += 1
increment()
print(counter) # expected: 1
increment()
print(counter) # expected: 2
Setting up Python environment...