I have a homework assignment, and I have to make four different turtles move like they are planets around the sun. I have it all written, its just a matter of making the turtles draw at the same time. I was wondering if there was a relatively easy way to make them start around the same time (within reason)? Anyway, here's the code:
def planets():
"""simulates motion of Mercury, Venus, Earth, and Mars"""
import turtle
mercury = turtle.Turtle()
venus = turtle.Turtle()
earth = turtle.Turtle()
mars = turtle.Turtle()
mercury.shape('circle')
venus.shape('circle')
earth.shape('circle')
mars.shape('circle')
mercury.pu()
venus.pu()
earth.pu()
mars.pu()
mercury.sety(-58)
venus.sety(-108)
earth.sety(-150)
mars.sety(-228)
mercury.pd()
venus.pd()
earth.pd()
mars.pd()
mars.speed(7.5)
venus.speed(3)
earth.speed(2)
mars.speed(1)
mercury.circle(58)
venus.circle(108)
earth.circle(150)
mars.circle(228)
Thanks in advance!