Commit 78e95eb8 by BellCodeEditor

auto save

parent 814b8f0f
Showing with 19 additions and 14 deletions
......@@ -6,19 +6,24 @@ pen.color('sienna')
w = turtle.Screen()
w.bgcolor('wheat') # wheat小麦
pen.goto(0,0)# 移动到起点
pen.left(90)
pen.forward(100)
pen.left(30)
pen.forward(50)
pen.up()
pen.backward(50) # 后退
pen.down()
pen.right(60)
pen.forward(50)
pen.up()
pen.backward(50) # 后退
pen.left(30)
pen.backward(100)
def tree(n):
if n>=50:
pen.forward(n)
pen.right(30)
tree()
# pen.goto(0,0)# 移动到起点
# pen.left(90)
# pen.forward(100)#画树干
# pen.left(30)
# pen.forward(50)#画左边树枝并返回
# pen.up()
# pen.backward(50) # 后退
# pen.down()
# pen.right(60)
# pen.forward(50)#画右边树枝并返回
# pen.up()
# pen.backward(50) # 后退
# pen.left(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