If28. The year number is given (positive integer). Determine the number of days of this year, given that the normal year has 365 days, and the leap year - 366 days. A leap year is a year that is divisible by 4, except for those years that are divided by 100 and do not divide by 400 (for example, the years 300, 1300 and 1900 are not leap years, and 1200 and 2000 are leap years).

Solution in Python 3:

L = [2016,300,1300,1900,1200,2000]

for i in L:
s = "not leap"
if (i%4 == 0) and not(i%100 == 0 and i%400 != 0):
s = "leap"
print(i," : ",s)

if (i%4 == 0) and (i%100!= 0 or i%400 == 0):
s = "leap"
print(i," : ",s)