Python 2.7.11 Turtle Graphics崩溃

时间:2016-05-06 18:07:28

标签: python turtle-graphics

所以我在Python 2.7.11中使用turtle graphics:

制作了这段代码
1000

目前非常简单,但每当我尝试运行它时,Python Turtle Graphics窗口会出现,然后一切都会暂停,然后它会说" Not Responding"并关闭。我的代码中是否存在导致该问题的内容或是否是另一个问题?

1 个答案:

答案 0 :(得分:0)

您可以尝试进入乌龟主循环:

# other code...
turtle.onkey(right, "d")
turtle.mainloop()

我还发现乌龟需要.setheading(270)而不是.head(270)。你可能也需要改变你的另一个。