Commit 89fcb5b9 by BellCodeEditor

save project

parent 2c836d00
Showing with 9 additions and 0 deletions
......@@ -6,7 +6,16 @@ pen.color('sienna')
w = turtle.Screen()
w.bgcolor('wheat') # wheat小麦
def tree(n):
pen.speed(20)
if n>=0:
if n <=15:
color_list=['snow','lightcoral']
color=random.choice(color_list)
pen.pencolor(color)
pen.pensize(n/3)
else:
pen.color('sienna')
pen.pensize(n/10)
pen.forward(n)
angle = random.randint(0,30)
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