STEP 15: If every letter has been added to revealed_letters, the loop is done and the player is out of guesses!

  • Go to LOGIC and . Drop if indented inside and at the bottom of the for loop.
  • Change the test variable from choice to revealed_letters and the test value from "yes" to password.
  • Go to GRAPHICS and Actions. Drag out Say and drop it indented inside the if-block.
  • Change the string in .say() to "You're out of guesses!"

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)