Test GPT
import turtle
import random
# Set up the turtle and the screen
turtle.setup(800, 600)
screen = turtle.Screen()
# Create a list of raindrops as turtle objects
raindrops = []
for i in range(50):
raindrop = turtle.Turtle()
raindrop.shape("circle")
raindrop.color("blue")
raindrop.speed(0)
raindrop.penup()
raindrop.goto(random.randint(-350, 350), random.randint(200, 280))
raindrops.append(raindrop)
# Define the animation function
def animate():
for raindrop in raindrops:
y = raindrop.ycor()
y -= 5
raindrop.sety(y)
# If the raindrop has reached the ground, move it back to the top
if y < -300:
raindrop.goto(random.randint(-350, 350), random.randint(200, 280))
# Set the screen to update every 100 milliseconds
screen.ontimer(animate, 100)
# Start the turtle graphics loop
turtle.mainloop()