WARNING: This program has a bug, which means we need to debug it! Let's find the logic error!

RULE: We use indentation to organize our programs. If we want something inside an if statement, it needs to have a yellow block ···· in front of it to show that it is indented four spaces.

  • Click Run and type in square into the answer bubble. Then watch the stage to see what's wrong.
  • Debug this program so that the circle only appears if the user answers "circle".

stage.set_background_color("azure") sprite = codesters.Sprite("snowman") sprite.go_to(-125, -62) choice = sprite.ask("Square or circle?") choice = choice.lower() if choice == "square": sprite.say("square!") sprite = codesters.Square(0, 0, 62, "green") if choice == "circle": sprite.say("circle!") sprite = codesters.Circle(0, 0, 94, "blue")