打印九九乘法表

 1 line =9
 2 while line >0:
 3     #print ("*")
 4     tmp =line
 5     while tmp >0:
 6         print ("#",end="")
 7         tmp-=1
 8     line -=1
 9     print()
10     
11 first  =0
12 while first <=9:
13     sec =1
14     while sec <= first:
15         print (str(sec) + "*" + str(first) + "=" +str(sec * first) , end ="	")
16         sec +=1
17     first +=1
18     print ()
View Code
原文地址:https://www.cnblogs.com/cindy7/p/10663773.html