#Module 4 Lab Act 1
def yearanalyzer(year):
if year % 4 != 0:
return False
elif year % 100 != 0:
return True
elif year % 400 != 0:
return False
else:
return True
year = int(input("Enter year"))
yearanalyzer(year)
print (yearanalyzer(year))
testdata = [1900, 2000, 2016, 1987]
testresults = [False, True, True, False]
for i in range (len(testdata)):
yr = testdata[i]
print(yr,"=> " , end="")
result = yearanalyzer(yr)
if result == testresults[i]:
print("OK")
else:
print("Failed")