STEP 5: Let's add more words to the hint so the player understands what the hint is.

Since password_length is storing a number, we must place it in str() to cast it as a string.

Remember, the + signs lets us join strings! The sprite now says "Hint: there are 6 letters in the word!"

  • Add these strings before and after the variable already in .say() so that the full parameters look like this! "Hint: there are " + str(password_length) + " letters in the word!"

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)