You can count on me!#
Write a function called counter
that prints out the number of times it’s been called. The first time you call it, it should print 1
. The second time, it should print 2
. The third time it should print 3
, the fourth time 4
, and so on. Your code should produce no output unless counter has been called.
Hint: use a global
variable and the global keyword!