Upload code

This commit is contained in:
2025-01-20 19:40:14 +01:00
parent 71625e3e41
commit 07809d7d77
66 changed files with 8917 additions and 0 deletions

32
Animation/Erde und Mond.py Executable file
View File

@@ -0,0 +1,32 @@
#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()