14 步:让我们把屋顶放在顶部并改变颜色。

  • 将 y 坐标更改为100
  • 将三角形的颜色更改为"green "
  • 确保更改正确的参数。使用评论作为指导。

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, 300, "blue")
  • Run Code
  • 提交作品
  • 下个活动
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)