STEP 9: We found the sum of all values in the list. Remember that we also need to find the number of values.

  • In the LOGIC tab, click on . Drag Get Length of List out and drop it OUTSIDE your loop.
  • Change the name to num_values. Change the argument in the parentheses to my_data.

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)