mirror of
https://gitlab.com/naja42/python-malbuch.git
synced 2024-11-21 23:23:21 +01:00
Add new file
This commit is contained in:
parent
28b11e2cb3
commit
71101092c9
33
Mandala 4
Normal file
33
Mandala 4
Normal file
@ -0,0 +1,33 @@
|
||||
## Code mit spazierender Schildkröte
|
||||
|
||||
from turtle import *
|
||||
shape("turtle")
|
||||
speed(0)
|
||||
for i in range(8):
|
||||
for i in range(4):
|
||||
forward(120)
|
||||
left(90)
|
||||
right(45)
|
||||
for i in range(8):
|
||||
right(90)
|
||||
forward(90)
|
||||
left(45)
|
||||
done()
|
||||
|
||||
## Code für das Erstellen von einer svg Datei
|
||||
|
||||
from svg_turtle import SvgTurtle
|
||||
|
||||
t = SvgTurtle(1000, 1000)
|
||||
|
||||
for i in range(8):
|
||||
for i in range(4):
|
||||
t.forward(120)
|
||||
t.left(90)
|
||||
t.right(45)
|
||||
for i in range(8):
|
||||
t.right(90)
|
||||
t.forward(90)
|
||||
t.left(45)
|
||||
|
||||
t.save_as('PyTurtle9.svg')
|
Loading…
Reference in New Issue
Block a user