Best and Worst Seats in a Classroom


def is_leap(year):

leap = False

if year % 4 == 0 and (year % 400 == 0 or year % 100 != 0):

leap = True

return leap

year = int(input())

print(is_leap(year))

A leap year is a year containing one additional day added to keep the calendar year synchronized with the astronomical or seasonal year. Because seasons and astronomical events do not repeat in a whole number of days, calendars that have the same number of days in each year drift over time with respect to the event that the year is supposed to track. By inserting (also called intercalating) an additional day or month into the year, the drift can be corrected. A year that is not a leap year is called a common year.

For example, in the Gregorian calendar, each leap year has 366 days instead of 365, by extending February to 29 days rather than the common 28 days. Adding one extra day to the calendar every four years compensates for the fact that a period of 365 days is shorter than a tropical year by almost 6 hours. Some exceptions to this basic rule are required since the duration of a tropical year is slightly less than 365.25 days. For example, in each cycle of 400 years, there are 97 leap years of 366 days and 303 years of 365 days (303 × 365 + 97 × 366 = 146097), so on average (over any interval), the calendar advances one day in 240 years.(http://en.wikipedia.org/wiki

def is_leap(year):

leap = False


Leave a Reply

Your email address will not be published. Required fields are marked *