Commit 148ba3c2 by BellCodeEditor

save project

parent a695fe4f
Showing with 3 additions and 2 deletions
......@@ -14,7 +14,7 @@ pen.backward(150) # 后退
pen.down()
def tree(n):
if n >= 50:
if n>= 0:
if n<=12:
color_list=["snow","lightcoral"]
color=random.choice(color_list)
......@@ -29,7 +29,8 @@ def tree(n):
pen.right(angle)
tree(n-length)
pen.left(2*angle)
tree(n-length)
pen.right(angle)
pen.up()
tree(100)
tree(60)
turtle.done()
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