WARNING: This program has a bug, which means it need to be fixed! This bug is a syntax error! Syntax errors are caused by code that doesn't follow the coding rules and create an error message.
RULE: You must create a sprite BEFORE you assign it commands. Programs run in order, top to bottom.

  • Click Run and read the error message.
  • Fix the order of the code so that the sprite is created before it moves.

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

stage.set_background("space") sprite.set_speed(1) sprite.move_up(50) sprite.move_right(75) sprite.move_left(200) sprite = codesters.Sprite("astronaut1")
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)