The counter at the door goes up by one with each click. The class Clicker is half written: count starts at 0. Finish click(). tally(n) clicks n times and reads count.
tally(3)→3tally(0)→0class Clicker:
def __init__(self):
self.count = 0
def click(self):
# your code here: add 1 to this counter's own count
pass
def tally(n):
c = Clicker()
for _ in range(n):
c.click()
return c.count
Run tries the examples. When they look right, Submit.