Commit 32e04b26 by BellCodeEditor

save project

parent 87039a14
Showing with 9 additions and 0 deletions
......@@ -12,6 +12,15 @@ t.down()
t.speed(0)
def tree(n):
if n>=0:
if n <= 15:
c=random.choice(["snow","lightcoral"])
t.pencolor(c)
t.pensize(5)
else:
t.pencolor("sienna")
t.pensize(n/10)
angle=random.randint(1,30)
length=random.randint(1,15)
t.forward(n)
t.right(angle)
tree(n-length)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment