视觉盛宴

1+
from turtle import Turtle,Screen

cs = [‘red’,’yellow’,’pink’,’orange’,’green’,’blue’,’purple’]

sc = Screen()
sc.bgcolor(‘black’)
sc.title(‘窗口标题’)
sc.delay(0)

tom = Turtle()
tom.shape(‘turtle’)
tom.speed(0)
for z in range(360):

for y in range(3,10):
c = cs[y-3]
tom.pencolor(c)
for x in range(y):
tom.fd(20)
tom.right(360/y)

tom.fd(15+y*5)

tom.bk(315)
tom.right(1)

1+

发表评论