STEP 5: We now have our password! Let's start on a function where we'll take in user input.

  • This function will need one parameter—the sprite asking the question. Then it will return the user's input.
  • In , drag in Define Function with Docstring above where it says: MAIN FUNCTION.
  • Rename my_function to get_user_input and type text_sprite inside the ( ).
  • Finally, change your docstring to the following: """ Asks user for input and displays result """

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)