python 九九乘法表

python 打印99乘法表

a = 1
while a <= 9 :
    b = 1
    while b <= a :
        print("%dx%d=%d\t" %(a,b,a*b),end="")
        b = b +1
    print() #换行
    a = a +1

 

posted @ 2018-07-17 19:07  北寒-  阅读(104)  评论(0编辑  收藏  举报