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
- This code needs to go below the loop and not be indented at all
It needs to happen after the loop has finished
- Start with if correct == False:
Don't forget the double equals sign
- Then tell them the right answer
- Then use an else
- And tell them how many guesses they had
- 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?