forked from extern/python-malbuch
32 lines
594 B
Plaintext
32 lines
594 B
Plaintext
## Code mit spazierender Schildkröte
|
|
|
|
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()
|
|
|
|
## Code für das Erstellen von einer svg Datei
|
|
|
|
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')
|