Commit 87fdd7e0 by BellCodeEditor

save project

parent 8dbf581e
Showing with 8 additions and 0 deletions
import turtle
import random
pen = turtle.Turtle()
pen.color('sienna')
......@@ -8,6 +9,13 @@ w.bgcolor('wheat')
def tree(n):
if(n>50):
if n<=12:
x=["snow","lightcoral"]
y=random.choice(x)
pen.pencolor(x)
pen.pensize(n/3)
else:
pen.pencolor()
pen.forward(n)
pen.right(30)
tree(n-10)
......
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