mirror of
https://gitlab.com/naja42/python-malbuch.git
synced 2024-11-22 07:33:31 +01:00
Add new file
This commit is contained in:
parent
9034e60092
commit
daa94dbea5
38
Mandala 7
Normal file
38
Mandala 7
Normal file
@ -0,0 +1,38 @@
|
||||
## 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')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user