第9步:让我们在函数中使用循环。指令的前面应当有一个绿色区块和一个紫色区块。

  • 点击 ,将 Loop through List 拖动到函数内部。
  • 将循环列表名称更改为 letters
  • 点击 ,将 Add Value 拖动到循环内部。

该循环将 letters 列表中的每个字母运行一次。我们将使用它让字母回到字符串。

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)