STEP 7:我们的网也可以出现在靠近地面或天空的位置!

  • 点击逻辑,然后.
  • Random Integer工具拖到代码底部。
  • 将 = 符号左侧的名称从my_varnety
  • 将括号中的数字从1, 10更改为-100, 100.

To navigate the page using the TAB key, first press ESC to exit the code editor.

stage.set_axis(100) stage.create_grid_overlay(10, "grey") stage.set_background("soccerfield") ballx = -80 bally = random.randint(-100,100) # sprite = codesters.Sprite("image", x, y) ball = codesters.Sprite("soccerball", ballx, bally) netx = 90
  • Run Code
  • 提交作品
  • 下个活动
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)