Commit 00e2470c by BellCodeEditor

save project

parent 931855df
Showing with 13 additions and 9 deletions
......@@ -11,14 +11,18 @@ pen.left(90)
pen.up()
pen.backward(150) # 后退
pen.down()
def tree(n):
if n>=50:
pen.forward(n)
pen.right(30)
tree(n-10)
pen.left(60)
tree(n-10)
pen.right(30)
pen.backward(n)
tree(100)
pen.forward(100)
pen.right(30)
pen.forward(50)
pen.backward(50)
pen.left(60)
pen.forward(50)
pen.backward(50)
pen.right(30)
pen.backward(100)
turtle.done()
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