STEP 6: Each firework will be made out of 10 lines of 3 circles each. That's a total of 30 particles each!

Our 3 colors are stored in a list. We can use a loop to make the particles of each color.

  • Go to the toolkit and drop Loop through List indented ···· inside the event.
  • Change value to color and my_list to color_list. This loop will repeat once for each color in color_list

To navigate the page using the TAB key, first press ESC to exit the code editor.

stage.set_background_color("black") amount = 10 speed = 5 color_list = ["purple", "yellow", "red"] stage.disable_all_walls() def click(): x = stage.click_x() y = stage.click_y() particle_list = [] # add other actions... stage.event_click(click)
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)