练习__单击画酷炫彩盘

0

from turtle import Turtle
from random import randint
from coloradd import*

def draw(x,y):
global color
t.goto(x,y)
t,pendown()
t.screen.tracer(0)
for i in range(1,randint(10,50)):
t.pencolor(color)
t.circle(i,180)
color=coloradd(color,0.01)
t.screen.update()
t.penup

color=(255,0,0)

t=Turtle(visible=False)

t.screen.title('单击画酷炫彩盘')
t.screen.setup(800,600)
t.screen.bgcolor('black')
t.screen.colormade(255)

t.pensize(4)
t.screen.onclick(draw)
t.screen.mainloop()

		
0

发表评论