10 步:让我们开始构建游戏。我们将为游戏的每个级别创建 10 个随机垃圾精灵。

  • 转到逻辑和.将Loop with Range拖到while循环顶部的空白区域。
  • range()中的数字从5更改为10每次while循环重复时,此循环将运行 10 次。
  • 并拖出两个Random Integer ,使它们for循环内。
  • 确保两个随机整数都缩进两次!它们都在这样的两个循环内。

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)