Commit 0b1b3e06 by BellCodeEditor

save project

parent a075876f
Showing with 15 additions and 0 deletions
......@@ -7,9 +7,24 @@ w = turtle.Screen()
w.bgcolor('wheat') # wheat小麦
# 移动到起点
pen.speed(10000000000000)
pen.left(90)
pen.up()
pen.backward(150) # 后退
pen.down()
def tree(m,n):
if m >= 0:
pen.forward(m)
pen.right(n)
tree(m-10,n)
pen.left(n*2)
tree(m-10,n)
pen.right(n)
pen.up()
pen.backward(m)
pen.down()
tree(100,30)
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