【Python】PYTHON九九乘法表

python2.7python

for i in range(1,10):
  for j in range(1,i+1):
    print j,'x',i,'=',j*i,'\t',
  print '\n'
print '\nDone'python2.7

 

 


 python3.7blog

 i = 1im

while i<=9:
  j = 1
  while j<=i:
    print ("%d*%d=%-2d "%(j,i,j*i),end="")
    j+=1
  print("")
  i+=1
img

相關文章
相關標籤/搜索