STEP 7: Your program uses a linear function rule to create a y-value for every x-value you pass into the loop.

We can use an .append() command to add values to our empty outputs list.

  • In LOGIC click on . Drop Append indented INSIDE the loop.
  • Change the list variable name before .append() from my_list to outputs.
  • Change the variable argument in .append() from my_var to y.

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)