Question OOP-CLS-0017
HardWhat is the output of this code?
class Counter:
count = 0
def bump(self):
self.count += 1
t = Counter()
for _ in range(5):
t.bump()
print(Counter.count, t.count)
- A.
0 5
- B.
Error
- C.
0 0
- D.
5 5
Sign up free to see the answer and a step-by-step explanation.