Commit a1412cf5 by BellCodeEditor

save project

parent a2de7913
Showing with 14 additions and 0 deletions
import turtle
import random
def tree(n):
if n>=0:
pen.forward(n)
pen.right(30)
tree(n-10)
pen.left(60)
tree(n-10)
pen.right(30)
pen.up()
pen.backward(n)
pen.down()
pen = turtle.Turtle()
pen.color('sienna')
# 画布大小
......@@ -11,6 +23,7 @@ pen.up()
pen.backward(150) # 后退
pen.down()
turtle.done()
pen.forward(100)
pen.right(30)
......@@ -24,3 +37,4 @@ pen.up()
pen.backward(50)
pen.down()
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