#-*- coding:utf-8 -*-try: year = int(raw_input('请输入年份(如2008): '))except: print '请输入正确的年份' exit()is_leap = Falseif year % 100 == 0 and year % 400 == 0: is_leap = Trueelif year % 100 != 0 and year % 4 == 0: is_leap = Trueif is_leap: print '%d年是闰年!' % yearelse: print '%d年不是闰年!' % year
免责声明:本站内容仅用于学习参考,信息和图片素材来源于互联网,如内容侵权与违规,请联系我们进行删除,我们将在三个工作日内处理。联系邮箱:chuangshanghai#qq.com(把#换成@)