【发布时间】:2020-07-12 15:56:14
【问题描述】:
我正在尝试在 Repl.it 上制作海龟游戏,但我不知道为什么这个错误不断出现。这是我的代码:
import turtle
wn = turtle.Screen()
wn.bgcolor("white")
wn.setup(width=800, height=800)
wn.tracer(0)
# Set up the ground
ground = turtle.Turtle()
ground.color("white")
ground.shape("square")
ground.speed(0)
ground.shapesize(stretch_wid=200, stretch_len=20)
ground.speed(0)
ground.color("black")
ground.penup()
ground.goto(0, -400)
ground.direction = "stop"
【问题讨论】:
-
我的回复对您有帮助吗?如果是这样,请将答案标记为已接受:)
标签: python object import attributes attributeerror