2020
09-28
09-28
python函数调用,循环,列表复制实例
我就废话不多说了,大家还是直接看代码吧!year=int(raw_input('year:\n'))month=int(raw_input('month:\n'))day=int(raw_input('day:\n'))sum=0months=(0,31,59,90,120,151,181,212,243,273,304,334)if0<month<=12:sum=months[month-1]else:print'dataerror!'sum+=dayleap=0if(year%400==0)or((year%4==0)and(year%100!=0)):leap=1if(leap==1)and(month>2):sum+=1print'itisthe%dthday.'%sumlist.sort()从小到大排列...
继续阅读 >