STEP 13: Let's store and display the return value of the function. Use our moon code as a guide.

  • From , drag Return Variable OUTSIDE the function.
  • Change the name of the return variable from my_var to dino_jupiter_weight.
  • Pass dino_earth_weight to the function get_jupiter_weight() (in the call parentheses!).

Since dino_earth_weight is storing 13310, passing it to the function is the same as passing in 13310!

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)