#绘制彩色螺旋线colors_spiral_line.py

import turtle
turtle.tracer(False)#不需要等待直接出图
turtle.bgcolor("black")
color=["red","yellow","violet","blue"]
for i in range (400):
    turtle.forward(i*2)
    turtle.color(color[i%4])
    turtle.left(91)
turtle.tracer(True)

1c6464405929b6b3e54e21aea65eeeb763e561f6
<mask token>

<mask token>
turtle.tracer(False)
turtle.bgcolor('black')
<mask token>
for i in range(400):
    turtle.forward(i * 2)
    turtle.color(color[i % 4])
    turtle.left(91)
turtle.tracer(True)

<mask token>
turtle.tracer(False)
turtle.bgcolor('black')
color = ['red', 'yellow', 'violet', 'blue']
for i in range(400):
    turtle.forward(i * 2)
    turtle.color(color[i % 4])
    turtle.left(91)
turtle.tracer(True)

import turtle
turtle.tracer(False)
turtle.bgcolor('black')
color = ['red', 'yellow', 'violet', 'blue']
for i in range(400):
    turtle.forward(i * 2)
    turtle.color(color[i % 4])
    turtle.left(91)
turtle.tracer(True)

#绘制彩色螺旋线colors_spiral_line.py

import turtle
turtle.tracer(False)#不需要等待直接出图
turtle.bgcolor("black")
color=["red","yellow","violet","blue"]
for i in range (400):
    turtle.forward(i*2)
    turtle.color(color[i%4])
    turtle.left(91)
turtle.tracer(True)
