Activity: Debugging 3

WARNING: This program has a bug, which means it needs to be fixed!
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.

Hint: Move the line with codesters.Sprite up above the line that says .set_speed(1)

stage.set_background("space") sprite.set_speed(1) sprite.move_up(50) sprite.move_right(75) sprite.move_left(200) sprite = codesters.Sprite("astronaut1")