棒棒糖 LJXZ

3+
from time import *
from turtle import *
from coloradd import *
from random import randint

screen=Screen()
screen.colormode(255)
screen.bgcolor(232,221,203)
screen.addshape('C:\\Users\\LENOVO\\Desktop\\1600603701162.gif')
screen.delay(0)

c=(255,0,0)
t=Turtle()
t.speed(1)
t.penup()
t.shape('C:\\Users\\LENOVO\\Desktop\\1600603701162.gif')
while True:
    t.penup()
    t.goto(randint(-683,683),randint(-384,384))
    t.pendown()
    t.setheading(270)
    t.pensize(5)
    t.fd(118)
    t.bk(118)
    for x in range(100):
        t.pendown()
        t.pencolor(c)
        t.fd(x/10)
        t.rt(15)
        t.pensize(x/10)
        c=coloradd(c,0.01)

3+

发表评论