screen = turtle.Screen()
screen.bgcolor("black")
def create_firework():
colors = ["red", "orange", "yellow", "green", "blue", "purple", "white"]
firework = turtle.Turtle()
firework.shape("circle")
firework.color(random.choice(colors))
firework.shapesize(0.5)
firework.penup()
firework.speed(0)
firework.goto(random.randint(-200, 200), -200)
......................
阅读全部 | 2023年7月7日 17:07