Show the output of the following program:
class Count:
def __init__(self, count = 0):
self.count = count
def main():
c = Count()
times = 0
for i in range(100):
increment(c, times)
print("count is", c.count)
print("times is", times)
def increment(c, times):
c.count += 1
times += 1
main() # Call the main function
Sorry the answer is not available at the moment…
If you are able to find the answer, please make sure to post it here. So that your Juniors have smile on their lips and feel happy.
Spread the 'tradition of sharing'.