STEP 9: We can use a variable as a parameter value. We have dino's weight stored near the top of the program!

Notice that dino·=·13310 . Instead of passing the value 13310 to the function, we'll pass in the variable dino . That let's us change all the program's calculations at once by simply changing the starting weight!

  • Change the parameter value to dino.
  • Click Run and look at the dino_moon_weight display.


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)