Commit 6912c549 by BellCodeEditor

save project

parent 26c4d312
Showing with 4 additions and 3 deletions
...@@ -2,6 +2,7 @@ import turtle ...@@ -2,6 +2,7 @@ import turtle
pen = turtle.Turtle() pen = turtle.Turtle()
pen.color('sienna') pen.color('sienna')
pen.speed(0)
# 画布大小 # 画布大小
w = turtle.Screen() w = turtle.Screen()
w.bgcolor('wheat') # wheat小麦 w.bgcolor('wheat') # wheat小麦
...@@ -10,10 +11,10 @@ def tree(n): ...@@ -10,10 +11,10 @@ def tree(n):
if n>=10: if n>=10:
pen.forward(n) pen.forward(n)
pen.right(30) pen.right(30)
tree(n-10) tree(n-15)
pen.left(60) pen.left(60)
tree(n-10) tree(n-15)
pen.right(30) pen.right(30)
pen.up() pen.up()
...@@ -28,6 +29,6 @@ pen.up() ...@@ -28,6 +29,6 @@ pen.up()
pen.backward(150) # 后退 pen.backward(150) # 后退
pen.down() pen.down()
tree(120) 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