forked from extern/python-malbuch
34 lines
573 B
Plaintext
34 lines
573 B
Plaintext
|
## Code mit spazierender Schildkröte
|
||
|
|
||
|
from turtle import *
|
||
|
speed(0)
|
||
|
shape("turtle")
|
||
|
for i in range(5):
|
||
|
right(75)
|
||
|
forward(150)
|
||
|
for i in range(4):
|
||
|
right(144)
|
||
|
forward(100)
|
||
|
penup()
|
||
|
goto(-10,-200)
|
||
|
pendown()
|
||
|
circle(200)
|
||
|
done()
|
||
|
|
||
|
## Code für das Erstellen von einer svg Datei
|
||
|
|
||
|
from svg_turtle import SvgTurtle
|
||
|
t = SvgTurtle(1000, 1000)
|
||
|
t.speed(100)
|
||
|
for i in range(5):
|
||
|
t.right(75)
|
||
|
t.forward(150)
|
||
|
for i in range(4):
|
||
|
t.right(144)
|
||
|
t.forward(100)
|
||
|
t.penup()
|
||
|
t.goto(-10,-200)
|
||
|
t.pendown()
|
||
|
t.circle(200)
|
||
|
t.save_as('PyTurtle10.svg')
|