练习3:这个程序很难阅读。让我们使用函数来进行组织,使其更容易阅读和编辑。

  • 创建一个名为 spell_1 的函数。放置巫师的指令召唤函数内部的流星。
  • 创建一个名为 spell_2 的函数。放置巫师的指令召唤函数内部的宝藏。
  • 创建一个名为 spell_3 的函数。放置巫师的指令召唤函数内部的龙。

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

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • 提交作品
  • 下个活动
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)