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 . Drop Append indented INSIDE your loop.
  • Change the variable name in front of .append() from my_list to rolls.
  • Change the argument in .append() 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)