mirror of
https://gitlab.com/naja42/python-malbuch.git
synced 2024-11-25 00:53:12 +01:00
Add new file
This commit is contained in:
parent
38c9c80bb4
commit
57a4adb051
31
Mandala 1
Normal file
31
Mandala 1
Normal file
@ -0,0 +1,31 @@
|
||||
## Code mit spazierender Schildkröte
|
||||
|
||||
from turtle import *
|
||||
shape("turtle")
|
||||
speed(100)
|
||||
for i in range(12):
|
||||
for i in range(8):
|
||||
forward(100)
|
||||
left(45)
|
||||
right(30)
|
||||
for i in range(8):
|
||||
forward(50)
|
||||
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(12):
|
||||
for i in range(8):
|
||||
t.forward(100)
|
||||
t.left(45)
|
||||
t.right(30)
|
||||
for i in range(8):
|
||||
t.forward(50)
|
||||
t.left(45)
|
||||
|
||||
|
||||
t.save_as('PyTurtle1.svg')
|
Loading…
Reference in New Issue
Block a user