forked from extern/python-malbuch
39 lines
686 B
Plaintext
39 lines
686 B
Plaintext
|
## Code mit spazierender Schildkröte
|
||
|
|
||
|
from turtle import *
|
||
|
shape("turtle")
|
||
|
speed(100)
|
||
|
for i in range (12):
|
||
|
for i in range(4):
|
||
|
circle(3,90,2)
|
||
|
forward(120)
|
||
|
left(120)
|
||
|
right(90)
|
||
|
for i in range(6):
|
||
|
right(90)
|
||
|
forward(120)
|
||
|
left(45)
|
||
|
done()
|
||
|
|
||
|
## Code für das Erstellen von einer svg Datei
|
||
|
|
||
|
from svg_turtle import SvgTurtle
|
||
|
t = SvgTurtle(1000, 1000)
|
||
|
t.shape("turtle")
|
||
|
t.speed(100)
|
||
|
|
||
|
for i in range (12):
|
||
|
for i in range(4):
|
||
|
t.circle(3,90,2)
|
||
|
t.forward(120)
|
||
|
t.left(120)
|
||
|
t.right(90)
|
||
|
for i in range(6):
|
||
|
t.right(90)
|
||
|
t.forward(120)
|
||
|
t.left(45)
|
||
|
|
||
|
t.save_as('PyTurtle7.svg')
|
||
|
|
||
|
|