警告:这个程序有一个逻辑错误,所以我们必须调试它。

规则:每个函数都需要被调用才能执行。这包括主要功能。

  • 点击运行,你会看到舞台上什么都没有发生
  • 修复程序以便设置舞台。注意:确保调用每个函数!
  • 点击运行以测试您是否修复了程序。固定好后点击提交接下来

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

#This program will recreate the story of the 3 little pigs def set_stage(): """ Sets up the stage for the start of the story """ stage.set_background("barn") sprite = codesters.Sprite("pig",-100,-125) def main(): """ Sets up the program and calls other functions """ set_stage()
  • Run Code
  • 提交作品
  • 下个活动
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)