附上代码:1
2
3
4
5
6
7
8
9
10
11
12import turtle
turtle.bgcolor("black")
turtle.speed(9)
colors = ["red","blue","yellow","green"]
#turtle.tracer(False)
for i in range(500):
turtle.pencolor(colors[i%4])
turtle.forward(i)
turtle.left(95)
#turtle.tracer(True)
turtle.done()