PARAMETERS: Functions can define parameters by name that have values provided by the function call.

  • Click Run and see what happens on the stage. Let's use parameters to make the stage much more colorful!
  • In the function definition, add the parameter name color within the parentheses. This will control the color!
  • Use the new parameter name by replacing "blue" where the circle sprite is created in the function with color.
  • In each function call for make_circle(), include a color string of your choice within the parentheses.

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)