STEP 11: In our program, we'll want the user to change the color of each pixel back and forth.

  • Let's make the pixel interactive. In , drag in Sprite Click.
  • First, we don't want our pixels talking. Let's delete this line: sprite.say("Hello,·name")
  • In , drag in Get Color INSIDE your click event and change my_var to choice.

The .get_color() command gets the current color of a shape sprite.

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)