Modify a Global Variable Inside a Function
Adjust the
increment
function so that it modifies the global variable counter
. Every time you call increment
, it should increment counter
by 1.Premium
Python
Setting up Python environment...
Output