python turtle 简易彩虹图

简易彩虹图python turlte rainbow

简易彩虹图python turlte rainbow

"""
   简易彩虹图
"""
from turtle import *

t = Turtle(shape='turtle')
t.speed(0)

screen =  Screen()
screen.bgcolor("cyan")
screen.title("简易彩虹图")

color_list = ["#FF0000","#FFA600","#FFFF00", "#62FF00",
              "#1E56FC","#4800FF","#CC00FF","#69C5FF"]

diameter=180

t.penup()
t.goto(0,-120)

for color in color_list:
  t.color(color)  
  t.begin_fill()
  t.circle(diameter)
  t.end_fill()
  diameter -= 10