Format
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
This commit is contained in:
@@ -1,25 +1,26 @@
|
||||
#Import der Module
|
||||
# Import der Module
|
||||
import turtle
|
||||
import time
|
||||
|
||||
#Aufsetzen der Turtle instanzen
|
||||
# Aufsetzen der Turtle instanzen
|
||||
earth = turtle.Turtle()
|
||||
sun = turtle.Turtle()
|
||||
|
||||
#Vorbereiten der Benutzeroberfläche
|
||||
# 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
|
||||
|
||||
# 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)
|
||||
|
||||
@@ -29,4 +30,3 @@ earth.rt(90)
|
||||
|
||||
while True:
|
||||
earth_move()
|
||||
|
||||
Reference in New Issue
Block a user