We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
That's crazy simple. Wow. I did do if elif and elif.
if year%4 == 0:
leap = True
elif year % 100 == 0:
leap = False
elif year % 400 == 0:
leap = True
for some reason it was wrong for 2100 the test case too. That makes so much sense. and makes it so that both have to be true. Truly a masterful stroke.
Write a function
You are viewing a single comment's thread. Return to all comments →
That's crazy simple. Wow. I did do if elif and elif. if year%4 == 0: leap = True elif year % 100 == 0: leap = False elif year % 400 == 0: leap = True