Commit 2847a7a0 by BellCodeEditor

save project

parent 92800268
Showing with 10 additions and 3 deletions
import turtle
import random
list = ["snow","light coral"]
def tree(n):
if n >= 20:
angle = random.randint(10,30)
length= random.randint(10,15)
if n >= 0:
if n <= 12:
pen.pensize(n/3)
pen.pencolor(random.choice(list))
else:
pen.pensize(n/10)
pen.pencolor('sienna')
angle = random.randint(5,30)
length= random.randint(1,15)
pen.forward(n)
pen.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