python 输出99乘法表
i = 1
while i <= 9: i += 1 j = 1 while j <= i-1: print("{}*{}=".format(j,i-1),j*(i-1),sep='',end=' ') j += 1 print('') for i in range(1,10): for y in range(1,i+1): print('{}*{}='.format(y,i),y*(i),end=' ',sep='') print('') for i in range(1,10): for y in range(1,i+1): print('{}*{}={}'.format(y,i,y*i),end=' ',) print('')
posted on 2021-02-10 11:28 __director 阅读(72) 评论(0) 编辑 收藏 举报