STEP 11: Let's create a random index to pick a middle!

  • In LOGIC, go to and drag Random Integer to the bottom of your program.
  • Change the variable name from my_var to random_body.
  • Change the range in .randint() to 0, 5.

Remember: there are 6 items in the list, so the first index is 0 and the last index is 5.

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)