Commit bc25ba97 by BellCodeEditor

auto save

parent 3f74666d
Showing with 12 additions and 14 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.forward(a)
pen.left(90) pen.backward(a)
pen.up() pen.left(60)
pen.backward(150) # 后退 tree(a-10)
pen.down() pen.forward(a)
pen.forward(100) pen.backward(a)
pen.right(30) pen.right(30)
pen.forward(50) tree(a-10)
pen.backward(50) pen.backward(a)
pen.left(60) tree(100)
pen.forward(50)
pen.backward(50)
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