Challenge 4: Debug the program so that the butterfly asks "zombie or kitten?" and shows the image you choose.

  • Click Run and read the error message.
  • Debug the program then click Run and type in your choice to check your work.

Hint: Commands that run as part of an if statement should have a yellow block ···· in front of them to show they are indented 4 spaces.

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

stage.set_background("flowers") sprite = codesters.Sprite("butterfly", 0, 100) choice = sprite.ask("zombie or kitten?") if choice == "zombie": sprite.say("zombie") sprite = codesters.Sprite("Zombie1", -100, 00) if choice == "kitten": sprite.say("Kitten") sprite = codesters.Sprite("kitten", 100, 0)
  • Run Code
  • Enviar Trabajo
  • Actividad Siguiente
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)