STEP 4: Let's have our sprite say the name that the user entered.

Since our sprite will say a value that changes depending on the user, we use a variable in the say command.

  • Click on . Drag out Say.
  • In the .say() command, replace "I am a sprite." with the variable user_name (not in quotes!).
  • Run your program to see your sprite say the name you enter in the question prompt.

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)