Python 打印9x9乘法表

python 打印9x9乘法表

i=1
print("-"*50)
while i<10:
    n=1
    while n<=i:
        print("{:}X{:}={:2d} ".format(n,i,i*n),end='')
        n+=1
    print()
    i+=1
print("-"*50)

这里写图片描述

猜你喜欢

转载自blog.csdn.net/yu876876/article/details/81304400