• + 1 comment

    Day of the programmer Solution [PYTHON] :

    def dayOfProgrammer(year):
        # Write your code here
    if year < 1918:
        if year % 4 == 0:
            result = ("12.09." + str(year))
        else:
            result = ("13.09." + str(year))
    elif year == 1918:
        result = ("26.09.1918")
    else:
        if year % 400 == 0 or (year % 100 != 0 and year % 4 == 0):
            result = ("12.09." + str(year))
        else:
            result = ("13.09." + str(year))
    return result