def is_leap(year):
    """
    Takes year as input, and returns if its leap year or not.

    :param year: a calendar year
    :type year: int
    :return: true or false
    :rtype: boolean
    """
    if year % 4 != 0:
        return False
    elif year % 100 != 0:
        return True
    elif year % 400 != 0:
        return False
    else:
        return True