[python]代码库
# coding=utf-8
import turtle
import time
# 同时设置pencolor=color1, fillcolor=color2
turtle.color("red", "yellow")
turtle.begin_fill()
for i in range(90):
turtle.penup()
turtle.goto(0,0)
turtle.pendown()
turtle.speed(30)
turtle.fd(400)
turtle.left(178)
turtle.end_fill()
for i in range(90):
turtle.color("green", "yellow")
turtle.penup()
turtle.goto(0,0)
turtle.pendown()
turtle.speed(30)
turtle.fd(400)
turtle.left(178)
turtle.end_fill()
for i in range(90):
turtle.color("black", "yellow")
turtle.penup()
turtle.goto(0,0)
turtle.pendown()
turtle.speed(30)
turtle.fd(400)
turtle.left(178)
turtle.end_fill()
turtle.mainloop()