第9步:是时候跳完最后的舞蹈动作了!点击 并拖出 Define Function

  • 将新函数放置在 sway 函数之后、函数调用代码行之前的位置。
  • 将函数命名为 two_step
  • Loop with Range 拖动到 two_step 函数内部。
  • Say 拖动到循环内部。它应该缩进8个空格,因为它被嵌套了两次。

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)