There really is no hope of making this code even half-way decent without spending the time to rewrite them all properly. Don't want to do any of that
33 lines
540 B
Python
Executable File
33 lines
540 B
Python
Executable File
# Import der Module
|
|
import turtle
|
|
import time
|
|
|
|
# Aufsetzen der Turtle instanzen
|
|
earth = turtle.Turtle()
|
|
sun = turtle.Turtle()
|
|
|
|
# Vorbereiten der Benutzeroberfläche
|
|
turtle.bgcolor("black")
|
|
turtle.addshape("earth.gif")
|
|
turtle.addshape("sun.gif")
|
|
earth.shape("earth.gif")
|
|
sun.shape("sun.gif")
|
|
|
|
|
|
# Erde umkreist Sonne
|
|
def earth_move():
|
|
for i in range(10):
|
|
earth.fd(1)
|
|
earth.rt(0.2)
|
|
time.sleep(0.01)
|
|
|
|
|
|
turtle.tracer(2)
|
|
|
|
earth.pu()
|
|
earth.fd(250)
|
|
earth.rt(90)
|
|
|
|
while True:
|
|
earth_move()
|