Commit bc25ba97 by BellCodeEditor

auto save

parent 3f74666d
Showing with 13 additions and 15 deletions
...@@ -5,19 +5,17 @@ pen.color('sienna') ...@@ -5,19 +5,17 @@ pen.color('sienna')
# 画布大小 # 画布大小
w = turtle.Screen() w = turtle.Screen()
w.bgcolor('wheat') # wheat小麦 w.bgcolor('wheat') # wheat小麦
def tree(a):
# 移动到起点 if a>=50:
pen.left(90)
pen.up() pen.forward(a)
pen.backward(150) # 后退 pen.backward(a)
pen.down() pen.left(60)
pen.forward(100) tree(a-10)
pen.right(30) pen.forward(a)
pen.forward(50) pen.backward(a)
pen.backward(50) pen.right(30)
pen.left(60) tree(a-10)
pen.forward(50) pen.backward(a)
pen.backward(50) tree(100)
pen.right(30)
pen.backward(100)
turtle.done() 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