Commit 6edf72fe by BellCodeEditor

auto save

parent 9ca8810a
Showing with 2 additions and 16 deletions
...@@ -7,23 +7,10 @@ w = turtle.Screen() ...@@ -7,23 +7,10 @@ w = turtle.Screen()
w.bgcolor('wheat') # wheat小麦 w.bgcolor('wheat') # wheat小麦
# 移动到起点 # 移动到起点
pen.left(90) pen.left(90)
pen.up() pen.up()
pen.backward(150) # 后退 pen.backward(150) # 后退
pen.down() pen.down()
# turtle.done()
def tree(n): turtle.done()
if n>=50:
pen.left(90)
turtle.forward(n)
turtle.right(30)
tree(n-50)
pen.left(60)
tree(n-50)
pen.up()
pen.backward(n)
pen.down()
tree(150)
turtle.done()
\ No newline at end of file
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