第 2 步:什么也没发生,因为我们仍然需要调用我们的函数!我们将在main 函数中执行此操作。

主函数是程序的起点,它组织代码中的其他函数。

  • 单击逻辑部分。去并将Main Function拖到代码编辑器的底部和set_stage()函数之外。
  • 请注意,主函数已在程序的最底部自动调用。

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

def set_stage(): stage.set_background("soccerfield") stage.disable_floor()
  • Run Code
  • 提交作品
  • 下个活动
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)