Step 7 – Guessing game
It can be frustrating if you just get asked the same question time and time again.
I want to give the user three goes at getting the right answer.
To do this I need to change my loop.
THEORY: The loop is now going to use a variable called guesses to check how many guesses someone has had. You need to set it to 0 before you can use it in the while line.
Take care again here.

- Add a line to set guesses to 0
- Then change the while line to say keep doing it while the answer is wrong (correct == False) and guesses is less than 3 (guesses < 3)
In other words, do it while both of these things are true. That means it will stop once either they get the answer right or they use their three guesses up
- Then add the line that adds one to guesses after they've guessed
- Now run the program
This should work but the while line can be awkward to get right.
You'll need to run your program lots of times to check what happens when the user get the answer right first time, second time and third time.
You also need to check what happens if they get it wrong three times.