我一直在if语句中得到一个语法错误,我不知道为什么会得到这个错误。有人能帮忙吗
def draw_square(self, loc, width):
loc = (x, y)
for i in range (3):
width(width)
turtle.forward(60)
turtle.right(90)
turtle.forward(random.randint(10,100))
turtle.right(90)
turtle.forward(60)
turtle.right(90)
turtle.forward(random.randint(10, 100))
if turtle.xcor < or > x:
x = turtle.xcor
elif turtle.ycor < or > y:
y = turtle.ycor
return self.loc, self.width
我认为你的语法在以下方面是无效的:
尝试将其更改为:
相关问题 更多 >
编程相关推荐