第9步:我们希望鱼出现在控制台上随机的(x,y)坐标上。我们将在间隔事件中使用 rand_x rand_y 变量,以确保每两秒出现一条鱼。

  • 点击 ,将 Go To 拖动到间隔事件内部,并带有 ····
  • .go_to() 指令前面的名称更改为 fish
  • .go_to() 中的参数更改为 rand_xrand_y


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)