STEP 15: Now we can ask the user to choose the index for getting the legs image from our list.

  • In GRAPHICS, go to and drag Ask for Integer to the bottom of your program.
  • Change the input variable name from guess to legs_index.
  • Change the text string in .ask() to "Choose an index between 0 and 5."
  • Assign.ask() to head by changing the variable name before .ask() from sprite to head.

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)