Commit 40915916 by BellCodeEditor

save project

parent 56f1fc57
Showing with 22 additions and 2 deletions
...@@ -13,4 +13,25 @@ pen.backward(150) # 后退 ...@@ -13,4 +13,25 @@ pen.backward(150) # 后退
pen.down() pen.down()
turtle.done() turtle.done()
def def tree(n)
\ No newline at end of file if n >= 50
pen.forward(n)
pen.right(30)
tree(n-50)
pen.right(30)
pen.up()
pen.backward(n)
pen.down()
tree(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