Activity: Debugging 3

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.

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