STEP 9: Time to ask the user to guess the password!

  • From drag out Ask and drop it inside the for loop.
  • Change the input variable name from choice to guess.
  • Change the string in .ask() to "What do you think my word is?".

By placing the .ask() in the loop, we ask the user to guess once for each letter in password!

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)