def is_leap(year,print_=False):
    """ returns true if year is leap year, otherwise returns False and prints the output per assignment of print_"""
    if year % 4 == 0:
        if year % 100 == 0:
            if year % 400 == 0:

                if print_: print("Leap year")
                return True
            else:
                if print_: print("Leap yearNot a leap year")
                return False
        else:
            if print_: print("Leap year")
            return True
    else:
        if print_:print("Not a leap year")
        return False