Times Table Tester

Step 8 – Finishing off

Now let's add in a finishing off section.

If they got the answer right, I want to tell them how many guesses they used.

If they got the answer wrong, I want to tell them the right answer.

THEORY: to do this we need to use selection again. We're choosing what to tell them based on whether they got the answer right

    Code helper image
  1. This code needs to go below the loop and not be indented at all

    It needs to happen after the loop has finished

  2. Start with if correct == False:

    Don't forget the double equals sign

  3. Then tell them the right answer
  4. Then use an else
  5. And tell them how many guesses they had
  6. Now run the program and test it works

You'll need to test it really well again. What happens if they use 1, 2, 3 or 4 guesses?