海龟模块

1+

from time import sleep
from turtle import Turtle,Screen

cs = ['red','green','blue','yellow','orange','pink','cyan','purple','magenta','black']

screen = Screen()

j = Turtle(shape='turtle')
j.penup()
j.left(90)
j.fd(200)
biao = []
for x in range(10):
    j.color(cs[x])
    y = j.stamp()
    biao.append(y)
    j.bk(50)
    
j.color('red')

sleep(1000)
for i in biao:
    j.clearstamp(i)
    sleep(0.5)

1+

发表评论