Riddle me this – it's all Greek to me

Step 7 – Just three guesses

We need to limit the number of guesses to 3.

This makes things a little tricky so pay attention.

Code helper image
  1. Use the screenshot to make changes to your code to limit the guesses to 3

    Take care here. Just change the bits you need to!

  2. Run your code and get the answer wrong 3 times. Does it work?

    Don't forget the quotes ("), brackets and indents

That should work to limit the guesses to a maximum of three.

If that works then we can write a message at the bottom of the code using another if – else block.

This will tell the player how they did.

Code helper image
  1. Use the ideas in the screenshot to write your end of riddle message

    You'll need to use print commands inside the if and the else

    Watch the indent level. Python is really fussy about this

  2. Run your code and get the answer wrong 3 times. Does it work?
  3. Test your program works if you get the answer right on the first, second or third guess. It should work every time

Displaying the number of guesses

You might want to display the number of guesses someone took. That's quite easy, although there's a little trick to it.

Code helper image

This is an idea called concatenation. It doesn't involve tying cats together, but it does tie bits of the sentence together using + signs.