题目
打印杨辉三角
import numpy as np
a = np.zeros((10,10))
a[0,0] = 1
for i in range(1,10):
a[i,0] = 1
a[i,i] = 1
if i >= 2:
for j in range(1,i):
a[i,j] = a[i-1,j] + a[i-1,j-1]
for m in range(0,10):
for n in range(0,m+1):
print('%i '%a[m,n],end='')
print('
')