Commit 4fc06787 by BellCodeEditor

save project

parent 11f18fb3
Showing with 8 additions and 0 deletions
......@@ -3,6 +3,13 @@ import random
def tree(n):
if n>=0:
if n <= 12:
color_list = ['snow', 'lightcoral']
color = random.choice(color_list)
pen.color(color)
pen.pensize(n / 3)
else:
pen.color('sienna')
pen.pensize(n/10)
pen.forward(n)
angle = random.randint(0, 30)
......@@ -17,6 +24,7 @@ def tree(n):
pen.down()
pen = turtle.Turtle()
pen.color('sienna')
# 画布大小
......
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