Commit c2e5703f by BellCodeEditor

save project

parent ecfc5960
Showing with 14 additions and 10 deletions
...@@ -7,14 +7,17 @@ p.left(90) ...@@ -7,14 +7,17 @@ p.left(90)
p.pensize(5) p.pensize(5)
p.hideturtle() p.hideturtle()
p.speed(11) p.speed(11)
size = 100 def tree(size):
p.forward(size) if size >= 0:
size /= 2 p.forward(size)
p.left(30) p.left(30)
p.forward(size) tree(size-20)
p.penup() p.right(60)
p.backward(size) tree(size-20)
p.pendown() p.left(30)
p.right(60) p.penup()
p.forward(size) p.backward(size)
p.pendown()
tree(100)
turtle.done() turtle.done()
\ No newline at end of file
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