题解 | #递归画图#
递归画图
http://www.nowcoder.com/practice/d01d668861f84471872ff0e9c958cae2
def paint(a,b,c):
print(" "*a+"#"*b)
if c<4:
return paint(a-1,b+2,c+1)
elif c>=4 and c<8:
return paint(a+1,b-2,c+1)
paint(4,1,1)
print(" "*a+"#"*b)
if c<4:
return paint(a-1,b+2,c+1)
elif c>=4 and c<8:
return paint(a+1,b-2,c+1)
paint(4,1,1)