Upload code
This commit is contained in:
43
RandomTurtle/blume.py
Executable file
43
RandomTurtle/blume.py
Executable file
@@ -0,0 +1,43 @@
|
||||
from turtle import*
|
||||
|
||||
lt(90)
|
||||
width(3)
|
||||
speed(1000)
|
||||
|
||||
def stiel(orientation):
|
||||
color("green")
|
||||
for i in range(50):
|
||||
if orientation > 1 and orientation < 3:
|
||||
fd(7)
|
||||
lt(1)
|
||||
else:
|
||||
fd(7)
|
||||
rt(1)
|
||||
|
||||
|
||||
def leaves():
|
||||
color("red")
|
||||
for i in range(100):
|
||||
fd(3)
|
||||
rt(360/100)
|
||||
|
||||
|
||||
|
||||
|
||||
def blume(orientation_in,blaetter):
|
||||
stiel(orientation_in)
|
||||
for i in range(blaetter):
|
||||
leaves()
|
||||
rt(360/blaetter)
|
||||
|
||||
|
||||
ht()
|
||||
|
||||
blume(2,5)
|
||||
pu()
|
||||
home()
|
||||
fd(50)
|
||||
lt(90)
|
||||
pd()
|
||||
blume(1,10)
|
||||
exitonclick()
|
||||
Reference in New Issue
Block a user