python-malbuch/Mandala 8

32 lines
594 B
Plaintext
Raw Normal View History

2022-12-21 19:29:41 +01:00
## Code mit spazierender Schildkröte
2022-12-20 23:26:52 +01:00
from turtle import *
speed(100)
shape("turtle")
for i in range (5):
n = 20
for j in range (4):
left(n)
for k in range (4):
forward(340)
left(90)
n = n + 20
done()
2022-12-21 19:29:41 +01:00
## Code für das Erstellen von einer svg Datei
2022-12-20 23:26:52 +01:00
from svg_turtle import SvgTurtle
t = SvgTurtle(1500, 1500)
t.speed(0)
for i in range (5):
n = 20
for j in range (4):
t.left(n)
for k in range (4):
t.forward(340)
t.left(90)
n = n + 20
t.save_as('PyTurtle8.svg')