Your question is Leap Year Logic. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Write the logic of a program to find whether a given year is a leap year or not.
Implement the function using the Gregorian calendar rules. Return True if the year is a leap year and False otherwise. A year is leap if it is divisible by 400, or divisible by 4 but not by 100.
def is_leap_year(year):