看书看到的,好有意思
import turtle
colors = ['red','purple','blue','green','yellow','orange']
t = turtle.Pen()
turtle.bgcolor('black')
for x in range(360):t.pencolor(colors[x % 6])t.width(x/100+1)t.forward(x)t.left(59)
这是效果图,真好看
import turtle
t = turtle.Pen()
#使用字母t表示海龟的钢笔
for x in range(200):t.forward(x)t.left(46)