STEP 10: We calculated the average, so let's print it to the console to see it with all the other information.

Using a newline character creates a blank line after printing. Include \n in a string to do this.

  • Go to and drag Insert Single Value into the bottom of print_average().
  • Change the string to say "Average: {}\n" and replace my_var with average in the parentheses.
  • From , drag out Print Variable and change the variable to my_string.

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)