STEP 10: First, let's test if the user guessed the word correctly!

  • Click LOGIC, go to and drop if indented (nested) inside the for loop.
  • Change the test variable from choice to guess and change the test value from "yes" to password.
  • In GRAPHICS, click and drop Say inside the if statement. It will be indented 8 spaces total!

The conditional is nested inside the loop, so all commands inside the if-statement must be indented twice!

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)