海龟,滚!

1+

import turtle as t

ce = [‘red’,’orange’,’yellow’,’green’,
‘cyan’,’blue’,’purple’,’pink’]

t.bgcolor(‘black’)
t.shape(‘turtle’)
t.pencolor(‘white’)
t.fillcolor(‘red’)

i = 0

while True:
t.fillcolor(ce[i])
i = i + 1
if i>7:i=0

c = 1
while c<=30: t.shapesize(c) c = c + 1 while c>0:
t.shapesize(c)
c = c- 1

1+

发表评论