We want to add a button to the tally counter in Section 9.2 that allows an

profileadelen
 (Not rated)
 (Not rated)
Chat

 

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

    • 7 years ago
    python file attached
    NOT RATED

    Purchase the answer to view it

    blurred-text
    • attachment
      pyha.py