标签:ase bsp int exit raw_input input else utf-8 amp
1 #coding:utf-8 2 def isYear(year): 3 if (year%4 == 0) & (year%100 != 0): 4 print("%d年是闰年" %year) 5 elif year%400 == 0: 6 print("‘%d‘年是闰年" %year) 7 else: 8 print("‘%d‘不年是闰年" %year) 9 10 11 if __name__ =="__main__": 12 while True: 13 year=int(raw_input("please input a year:")) 14 if year == "exit": 15 print u"程序已结束!" 16 break 17 else: 18 isYear(year) 19
标签:ase bsp int exit raw_input input else utf-8 amp
原文地址:http://www.cnblogs.com/v1vvwv/p/7296019.html