WARNING: This program has a bug, which means we need to fix it!

RULE: If an event doesn't have any code indented underneath, the program will throw an error.

  • Click Run and read the error message.
  • Debug the program so the ghost says something when you click on it.
  • Hint: Indent the ghost's say command!

stage.set_background("hauntedhouse") sprite = codesters.Sprite("ghost", 0, -100) sprite.say("Click me to see a message!") def click(sprite): sprite.say('Boo!') sprite.event_click(click)