Code to determine if a given year is a leap year.
Implement is_leap_year(year) and return a Boolean: True when the year is a leap year and False otherwise. Apply the Gregorian calendar rules, with an input year from 1 through 9999.
def is_leap_year(year):