一、功能
计算润年
二、实现
a = input("Please input the year: ")
if a % 4:
print ("The yaar %s is not a leap year" % a)
else:
if a % 100 :
print ("The year %s is a leap year" % a)
elif a % 400:
print ("The year %s is not a leap year" % a)
else:
print ("The year %s is a century leap year" % a)
i = 0
for a in range(1890, 2021):
if a % 4:
# print ("The yaar %s is not a leap year" % a)
pass
else:
if a % 100 :
print ("The year %s is a leap year" % a)
i = i + 1
elif a % 400:
# print ("The year %s is not a leap year" % a)
pass
else:
print ("The year %s is a century leap year" % a)
i = i + 1