STEP 3: Fireworks are colorful! Let's store our firework colors in a list so that each burst looks the same.

A list is a variable that stores a group of items in a specific order. In this case, our list will hold a group of strings.

  • In LOGIC from drag out List of Strings. Change the list's name from my_list to color_list.
  • Change the list's contents from ["cat", "dog", "pig"] to ["purple", "yellow", "red"].

Lists require commas between items and surrounding brackets. Otherwise, you'll get an error!

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
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)