定义函数count_day(y,m,d),y,m,d分别是年月日,输入某年某月某日,返回这一天是这一年的第几天
defcount_day(y,m,d):list1=[0,31,28,31,30,31,30,31,31,30,31,30,31]day=0if(y%400==0)or(y%4==0andy%100!=0):list1[2]=list1[2]+1foriinrange(m):day=day+list1[i]return("%d年%d月%d日是这一年的第%d天"%(y,m,d,day+d))