第 13 步:我们的屋顶并没有完全覆盖整个房子。这不好!

  • 将三角形的大小更改为300
  • 查看三角形代码上方的灰色comment ,以查看哪个参数控制大小。

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

# sprite = codesters.Circle(x, y, diameter, "color") sun = codesters.Circle(-150, 175, 75, "gold") # sprite = codesters.Square(x, y, width, "color") house = codesters.Square(0, -125, 250, "purple") # sprite = codesters.Triangle(x, y, size, "color") roof = codesters.Triangle(0, 0, 100, "blue")
  • Run Code
  • 提交作品
  • 下个活动
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)