STEP 3: Let's now call create_stars() inside main(). This is one of the functions we provided for you.

  • Our create_stars function requires two parameters. We'll input numbers here, but change them later.
  • In , drag Call with Parameters inside and to the bottom of main().
  • Change my_function() to create_stars().
  • Finally change my_var1 to 100 and my_var2 to "yellow". Press Run to see stars on the stage!

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)