#输入某年某月某日,判断这一天是这一年的第几天?
#!/usr/bin/python
-- coding: UTF-8 --
#!/usr/bin/python
-- coding: UTF-8 --
year=int(2019)
month=int(8)
day=int(13)
months1=[0,31,60,91,121,152,182,213,244,274,305,335,366] #闰年
months2=[0,31,59,90,120,151,181,212,243,273,304,334,365] #平年
if ((year%40)and(year%100!=0)) or((year%1000)and(year%400==0)):
Dth=months1[month-1]+day
else:
Dth=months2[month-1]+day
print (“是该年的第%d天”%Dth)