STEP 5: In order to draw, the point needs to be able to move!

  • Click and drag Right Key into the bottom of your program.
  • Click Run and and use the right arrow key on your keyboard to move the point. It draws a thin green line!

Notice that the event you dragged in contains indented code. An indent ····¬ is 4 spaces or 1 tab.

The last line of code is the event handler. It runs the indented code every time the right arrow key is pressed.

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

stage.set_background_color("black") # sprite = codesters.Point(x, y) sprite = codesters.Point(50, 100) sprite.set_color("green") sprite.pen_down()
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)