Commit 8b65bd2a by BellCodeEditor

auto save

parent a543d29a
Showing with 3 additions and 2 deletions
...@@ -9,7 +9,8 @@ w.bgcolor('wheat') # wheat小麦 ...@@ -9,7 +9,8 @@ w.bgcolor('wheat') # wheat小麦
# 移动到起点 # 移动到起点
# 后退 # 后退
def tree(n): def tree(n):
if n>=0: if n>=50:
pen.pensize( n\10 )
pen.forward(n) pen.forward(n)
pen.right(30) pen.right(30)
tree(n-10) tree(n-10)
...@@ -23,5 +24,5 @@ pen.left(90) ...@@ -23,5 +24,5 @@ pen.left(90)
pen.up() pen.up()
pen.backward(150) pen.backward(150)
pen.down() pen.down()
tree(50) tree(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