day4-九九乘法表

a = 1
while a<=9:
   b = 1
   while b <=a:
      print('%d*%d=%d'%(b,a,a*b),end='\t')
      b+=1
   print('')
   a+=1



for i in range(1,10):
   for a in range(1,i+1):
      print('%d*%d=%d'%(a,i,i*a),end='\t')
   print('')

for i in range(1,10):
   for a in range(i, 10-1):
      print(end='        ')
   for b in range(1,i+1):
      print('%d*%d=%2d'%(b,i,i*b),end='\t')
   print('')



for i in range(1,10):
   for a in range(i,10):
      print('%d*%d=%d'%(i,a,i*a),end='\t')
   print('')

for i in range(1,10):
   for a in range(1,10-i):
      print(end='        ')
   for b in range(1,i+1):
      print('%d*%d=%d'%(i,b,i*b),end='\t')
   print('')

for i in range(1,10):
     for k in range(1,10-i):
         print(" "*7,end='')
     for j in range(1,1+i):
         print("%d*%d=%2d" % (j,i,j*i),end=" ")
     print ("")


a = 1
while a <=9:
   b=1
   while b <= 9-a:
      print('        ',end='')
      b+=1
   c = 1
   while c <=a:
      print('%d*%d=%2d'%(a,c,a*c),end='\t')
      c+=1
   print('')
   a+=1
;