绘制彩图--圆形

photoor 1年前 ⋅ 408 阅读

import turtle

turtle.bgcolor('black')

turtle.title('Welcom star')

turtle.setup(800,600)

colors=['cyan'] tpen=turtle.Pen()

y=len(colors)

tpen.speed(0)

for x in range (1,101):

tpen.color(colors[x%y])

tpen.circle(x)

tpen.left(30)

turtle.mainloop()

L7_Circle.PNG


全部评论: 0

    我有话说: