STEP 6: Let's have this function return the value of moon_weight.

Using a return statement will allow us to use the value moon_weight, outside of the function.

  • Go to and drag Return Statement inside the function so that it has a ···· in front of it.
  • Change the variable in the return statement from my_var to moon_weight.
  • In GRAPHICS, go to and drag in Moon unindented OUTSIDE your function.

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)