Commit 9bf683fa by BellCodeEditor

save project

parent 7f7a0bd2
Showing with 14 additions and 0 deletions
......@@ -13,3 +13,16 @@ pen.backward(150) # 后退
pen.down()
turtle.done()
def tree(n):
if n>=0:
pen.forward(n)
pen.right(30)
tree(n-10)
pen.left(60)
tree(n-10)
pen.right(30)
pen.up()
pen.backward(n)
pen.down()
\ 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