STEP 10: Time to use string indexing to concatenate the first letter of each word into the password!

  • From add Add Value indented in the loop. We'll use this to add on to the string in password!
  • Change my_var to password and 1 to word[0].

Every time the loop runs the string stored in word updates, and the first letter of that word is added to password using string concatenation.

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)