![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
同於道
这个作者很懒,什么都没留下…
展开
-
Python小程序:九九乘法表
Python小程序—九九乘法表def print_table(): '''打印九九乘法表''' r = range(1, 10) for i in r: for j in r: if j <= i: print('{0} * {1} = {2}'.format(j, i, i*j), end='\t')原创 2017-11-06 19:15:37 · 785 阅读 · 0 评论 -
Python小程序:判断闰年
def is_leap_year(year): """ 能被4整除且不能被100整除;能被400整除 """ if year % 400 == 0: return True if year % 4 == 0 and year % 100 != 0: return True return False原创 2017-11-19 22:33:35 · 10003 阅读 · 0 评论