We want to add a button to the tally counter in section 9.2 that

 

1.     We  want to add a button to the tally counter in Section 9.2 that allows an  operator to undo accidental button click. Provide a method

def undo(self)

 that simulates such a button. As an added precaution, make sure an undo doesn’t cause the counter to be less than zero.

a)    Your code with comments

b)    A screenshot of the execution

Test Case:

Reset

2 clicks

Print Value

1 click

Print Value

2 undos

Print Value

2 undos

Print Value

Need your ASSIGNMENT done? Use our paper writing service to score better and meet your deadline.


Click Here to Make an Order Click Here to Hire a Writer