Commit ac2fbcb7 by BellCodeEditor

auto save

parent 576b5884
Showing with 30 additions and 0 deletions
from turtle import *
from random import *
def tree(n):
if n >= 0:
pen.fd(n)
pen.rt(30)
tree(n - 10)
pen.lt(60)
tree(n - 10)
pen.rt(30)
pen.pu()
pen.bk(n)
pen.pd()
pen = Pen()
pen.color('sienna')
#pen.ht()
# 画布大小
w = Screen()
w.bgcolor('wheat') # wheat小麦
# 移动到起点
pen.lt(90)
pen.pu()
pen.bk(150) # 后退
pen.pd()
tree(50)
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