I would like to create balls going around in a circle with different radiuses, similar to the solar system. In my attempt, the algorithm should create balls -initialize them to locations of radius , then start spinning at the same time, in my attempt the balls do not start at the same time, I suspect it's something to do with the for loop.
import turtle, numpy as np
a = np.linspace(0,2*np.pi,100)
balls = []
ball_colour = ['orange','blue','brown','black','red','pink','yellow']
ball_shape =['circle', 'square','triangle']
for _ in range(3):
balls.append(turtle.Turtle())
for ball in balls:
raduis = np.random.randint(0,8)
x = raduis*np.cos(a)
y = raduis*np.sin(a)
ball.shape(ball_shape[np.random.randint(0, 3)])
ball.color(ball_colour[np.random.randint(0,(len(ball_colour)-1))] )
ball.goto(raduis,y[i])
ball.dy =0.001
ball.dx = 0.001
ball.speed(np.random.randint(15))
for ball in balls:
for i in range(100):
ball.sety(ball.ycor()+raduis*np.sin(a)[i] +ball.dy)
ball.setx(ball.xcor()+raduis*np.cos(a)[i]+ ball.dy)
worth pointing out that sometimes I run into an error saying that the turtle has no attribute 'dy', but sometimes it does not show the error. Nevertheless the my main goal is to initialize the balls at different radius and that start at the same time.

