EXAMPLE: Let's look at an example of the kind of project you'll be making today.

  • Click Run to see the example.
  • This program has a sprite that glides to different locations on the coordinate plane to pick up objects.
  • Watch the snowman glide around the stage. Then, click the Ticket to answer a question about the program.
  • When you're finished, click Submit and Next to continue.

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

stage.set_background("winter") sprite = codesters.Sprite("snowman") sprite.set_size(.5) sprite.pen_down() sprite.glide_to(5, -6) def collision(sprite, hit_sprite): hit_sprite.hide() # add any other actions... sprite.event_collision(collision) sprite.glide_to(5, 2) sprite.glide_to(0, 6) sprite.glide_to(-7, 2) sprite.glide_to(-7, -6) sprite.glide_to(0, 0)
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)