彩色贪吃蛇实验

 1 import turtle
 2 turtle.setup(650,350,200,200)
 3 turtle.penup()
 4 turtle.fd(-250)
 5 turtle.pendown()
 6 turtle.pensize(25)
 7 turtle.pencolor("purple")
 8 turtle.seth(-40)
 9 colors = ["red","yellow","pink","blue"]
10 for i in range(4):
11     turtle.circle(40,80)
12     turtle.circle(-40,80)
13     turtle.pencolor(colors[i])
14 turtle.color("blue")
15 turtle.circle(40,80/2)
16 turtle.fd(40)
17 turtle.color("green")
18 turtle.circle(16,180)
19 turtle.fd(40 * 2/3

彩色贪吃蛇实验

 

上一篇:Process finished with exit code -1073741819 (0xC0000005)


下一篇:画图python turle库