PREVIEW: Today, you will be sending a spaceship to pick up Codester sprites in space!

The Codesters stage is an xy-coordinate plane with (0, 0) in the middle (the origin) .

  • We use x and y coordinates to put sprites in specific places and to guide them around the stage.
  • Click Run to see an example of the kind of program you're going to be making today.

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

stage.set_background("space") sprite = codesters.Sprite("ufo") sprite.set_size(0.4) sprite.go_to(-200, -200) sprite.glide_to(-100, -100) def collision(sprite, hit_sprite): hit_sprite.hide() # add any other actions... sprite.event_collision(collision) sprite.set_speed(2) sprite.glide_to(150, -100) sprite.glide_to(150, 100) sprite.glide_to(-150, 200) sprite.glide_to(-200, 50) sprite.glide_to(-200, -200) sprite.turn_left(360)
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)