#Python蓝桥杯例题12
import turtle as t
t.setheading(90)
def drawTree(n,tl):
if n==0:
return
t.left(30)
t.fd(tl)
drawTree(n-1,tl-6)#递归左边
t.fd(-tl)
t.right(60)
t.fd(tl)
drawTree(n-1,tl-6)#递归右边
t.fd(-tl)
t.left(30)
drawTree(4,60)
t.done()