爱上python编程没道理,苏苏老师教你学编程,简单又有趣,赶紧试试看吧!
#NiceHexSpiral.py
import turtle
colors=[‘red’,‘purple’,‘blue’,‘green’,‘yellow’,‘orange’]
t=turtle.Pen()
turtle.bgcolor(‘black’)
for x in range(100):
t.pencolor(colors[x%6])
t.width(x/100+1)
t.forward(x)
t.left(59)
t.speed(100000)
python美轮美奂的多边螺旋图
最新推荐文章于 2022-03-18 12:00:00 发布