STEP 4: Let's create a function that will calculate how much the T-rex and kitten would weigh on the moon!

  • Go to and drag out Define Function with Parameter.
  • Change the name of the function from my_function() to get_moon_weight().
  • Rename the function parameter variable from my_var to earth_weight.
  • In GRAPHICS, from drop Moon inside the function. It should have a ···· in front of it.

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)