第 4 步:它看起来不像条纹!它需要更长更宽。

评论是灰色的,前面有一个# 。它们供您阅读,并被程序忽略。矩形上方的注释告诉我们矩形代码中的每个参数控制什么: (x, y, width, height, "color")

  • 将矩形的宽度参数从100更改为700

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

stage.set_background_color("lightblue") # sprite = codesters.Rectangle(x, y, width, height, "color") sprite = codesters.Rectangle(0, 0, 100, 50, "gold")
  • Run Code
  • 提交作品
  • 下个活动
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)