循环,第 1 部分:运行程序并观察球员冲过球门!哎呀!

  • 尝试更改range().move_right()中的数字以使球停在网上。
  • 如果你没有得到完美,别担心!有一个更简单的方法。我们将for循环切换到while循环!
  • 删除for · counter · in · range( 100 )并拖入While Less Than以替换它。
  • 三个地方将变量counter更改为ball_x :循环上方、循环条件中和循环中。

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)