python turtle作品(螺旋+养眼图)
python turtle作品(螺旋+养眼图)
螺旋图:
import turtle
t = turtle.Turtle()
t.speed(0)
i = 1
t.clear()
colours=["red","orange","yellow","green","cyan","blue","purple"]
while True:
t.width(5)
t.forward(i)
t.left(100)
t.color(colours[i%7])
i += 1
养眼
原创
2020-06-23 20:25:17 ·
2858 阅读 ·
0 评论