STEP 2: First we will create a variable to store the password that the user will guess.

We will use the word "python" as an example for this lesson.

  • Click LOGIC, go to and drag String Variable to the bottom of your program.
  • Change the variable name from my_var to password.
  • Change the string to a word that you want the user to guess. (You can use "python" or something else!)

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)