Commit 15c66705 by BellCodeEditor

save project

parent 2fab91c5
Showing with 9 additions and 0 deletions
...@@ -15,6 +15,15 @@ pen.down() ...@@ -15,6 +15,15 @@ pen.down()
def tree(n): def tree(n):
if n >= 0: if n >= 0:
if n<=12:
color_list=['snow','lightcoral']
color=random.choice(color_list)
pen.pencolor(color)
pen.pensize(n/3)
else:
pen.pencolor('sienna')
pen.pensize(n/10)
pen.forward(n) pen.forward(n)
angle = random.randint(0,30) angle = random.randint(0,30)
length = random.randint(1,15) length = random.randint(1,15)
......
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