要求:
只使用numpy广播机制,不使用循环打印99乘法表
第一步:计算乘法表的得数
x = np.arange(1,10).reshape(9,1)
y = np.arange(1,10).reshape(1,9)
a = x*y
a = a.astype('str')
第二步:使用np.char.add()打印
x = np.arange(1,10).reshape(9,1).astype('str')
y = np.arange(1,10).reshape(1,9).astype('str')
m = np.full((9,9),'*')
n = np.full((9,9),'=')