is_leap_year

postprocessinglib.utilities._helper_functions.is_leap_year(year: int) bool

Determines if a year is a leap year

Parameters:

year (int) – the year being checked

Returns:

True if it is a leap year, False otherwise

Return type:

bool

Example

>>> from postprocessinglib.utilities import _helper_functions
>>> # Test 1: Testing the is_leap_year function with a leap year
>>> leap_year = 2000
>>> is_leap = _helper_functions.is_leap_year(leap_year)
>>> print(is_leap)
True
>>> # Test 2: Testing the is_leap_year function with a non-leap year
>>> non_leap_year = 2001
>>> is_leap = _helper_functions.is_leap_year(non_leap_year)
>>> print(is_leap)
False