Commit 06d9fee2 by BellCodeEditor

save project

parent eede9c27
Showing with 5 additions and 3 deletions
......@@ -7,14 +7,16 @@ w = turtle.Screen()
w.bgcolor('wheat') # wheat小麦
def tree(n):
if n>=50:
pen.pendown()
pen.forward(n)
pen.right(30)
tree(n-50)
tree(n-10)
pen.left(60)
tree(n-50)
tree(n-10)
pen.right(30)
pen.backward(n)
# 移动到起点
pen.penup()
pen.left(90)
pen.up()
pen.backward(150) # 后退
......
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