'''
打印乘法口诀表
'''
#正着打印
for i in range(1, 10):
for a in range(1, i+1):
print('%d x %d = %d '%(i, a, i * a), end='')
print('\n')
#倒着打印
for j in range(1, 10):
for l in range(1, 11-j):
print('%d x %d = %d '%(10-j, l, (10-j)*l), end='')
print('\n')
python乘法口诀表打印
最新推荐文章于 2022-11-17 17:47:10 发布