首页 > 其他 > 详细

打印九九乘法表

时间:2019-04-07 00:31:56      阅读:136      评论:0      收藏:0      [点我收藏+]
技术分享图片
 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 ="\t")
16         sec +=1
17     first +=1
18     print ()
View Code

 

打印九九乘法表

原文:https://www.cnblogs.com/cindy7/p/10663773.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!