DEMO 2 :对于我们程序的下一部分,我们将使用一个我们以前没有使用过的循环!

当我们遍历一个列表时,循环会为列表中的每个值运行一次。

  • 运行程序以查看示例。按照舞台上的指示完成活动。

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)