STEP 7: Let's collect the result of each roll and store it in a list.

The .append() command allows us to add a new item to an existing list.

  • In LOGIC, click on . Drag Append INSIDE your loop.
  • Change the name in front of the command from my_list to rolls.
  • Change the argument from my_var to outcome.

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)