生成上下对称的杨辉三角形
* * *
* * *
* * * *
* * * * *
* * * *
* * *
* *
*
i = -4
while i <= 4:
j = 0
while j <=4-abs(i):
print("*",end = " ")
j += 1
print("")
i += 1
生成上下对称的杨辉三角形
* * *
* * *
* * * *
* * * * *
* * * *
* * *
* *
*
i = -4
while i <= 4:
j = 0
while j <=4-abs(i):
print("*",end = " ")
j += 1
print("")
i += 1