预览:今天,我们将使用来自工具包的部分。

  • 点击运行以查看我们将在本课中创建的房屋的示例。
  • 观看鱼游后,单击提交接下来开始上课。

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

stage.set_background("underwater") # 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, "lightgreen") chimney = codesters.Rectangle(90, 75, 50, 150, "darkblue") # sprite = codesters.Triangle(x, y, size, "color") roof = codesters.Triangle(0, 100, 300, "magenta") # sprite = codesters.Rectangle(x, y, width, height, "color") door = codesters.Rectangle(0, -175, 75, 150, "aqua") sprite = codesters.Sprite("fish") sprite.set_speed(1) sprite.say("glug glug") sprite.glide_to(-100, -175) sprite.wait(1) sprite.glide_to(0, -175) sprite.say("See ya later!") sprite.wait(2) stage.remove_sprite(sprite)
  • Run Code
  • 提交作品
  • 下个活动
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)