初学Python,画了个二叉树,附效果图和代码

angle=15
import turtle as t
def Draw(n,length):
if n>0:
n1=n
length1=length
t.right(angle)
t.fd(length)
n=n-1
length=length2/3
Draw(n,length)
t.right(angle)
t.fd(-length1)#length的值已经改变
t.left(angle
2)
t.fd(length1)
Draw(n,length)
t.right(angle)
t.fd(-length1)
else:
t.right(angle)
t.fd(length)
t.fd(-length)
t.left(angle*2)
t.fd(length)
t.fd(-length)
print(‘advice:n=4 lenght=100\n’)
n,length=map(int,input(‘please input n and length:’).split())
t.setup(600,400,0,0)
t.seth(90)
Draw(n,length)初学Python,画了个二叉树,附效果图和代码