基本信息
源码名称:python 绘制彩色螺旋 示例源码
源码大小:0.25KB
文件格式:.py
开发语言:Python
更新时间:2017-06-28
   源码介绍


import turtle
import time
turtle.pensize(2)
turtle.bgcolor("black")
colors = ["red","yellow",'purple','blue']
turtle.tracer(False)
for x in range(400):
   turtle.forward(2*x)
   turtle.color(colors[x%4])
   turtle.left(91)
   turtle.tracer(True)