This code is supposed to print our every friday from the year 2014. I can’t get it to work [closed]

  python

This program is supposed to print out every friday in the year 2014.
The first friday of that year is 1.4.
Date order is with the day first and month second.
What is an in

def main():
    dayCount = 0
    for month in range(1, 13):

        if month == 2:
            for day in range(1, 29):
                dayCount += 1
                remainder = dayCount % 7
                if remainder == 3:
                    print(f"{day}.{month}.")
        elif month == 4:
            for day in range(1, 31):
                dayCount += 1
                remainder = dayCount % 7
                if remainder == 3:
                    print(f"{day}.{month}.")

        elif month == 6:
            for day in range(1, 31):
                dayCount += 1
                remainder = dayCount % 7
                if remainder == 3:
                    print(f"{day}.{month}.")


        elif month == 9:
            for day in range(1, 31):
                dayCount += 1
                remainder = dayCount % 7
                if remainder == 3:
                    print(f"{day}.{month}.")



        elif month == 10:
            for day in range(1, 31):
                dayCount += 1
                remainder = dayCount % 7
                if remainder == 3:
                    print(f"{day}.{month}.")


        else:
            for day in range(1, 32):
                dayCount += 1
                remainder = dayCount % 7
                if remainder == 3:
                    print(f"{day}.{month}.")


if __name__ == "__main__":
    main()

Source: Python Questions

LEAVE A COMMENT