10 Days of HackeRank's challenges - Day 3

Problem statement: Day of the programmer

Question summary

Given a year in the range 1700-2700 write a function that takes in the year as a parameter and prints out the Day of the programmer (which is the 256th day of the year) in Russia in the format dd.mm.yy. Take into consideration the fact that the year can be a leap year and the number of days in that year can also be influenced by Russia's official calendar for that given year which could be Julian Calendar (1700-1917) 1918(transition occurred from Julian to Gregorian) , Gregorian calendar (has been in use since 1919)

Out of the 61 test cases my solution failed 10.

Here is the link to my solution

github.com/Beri28/10-days-of-code/blob/main..

Here is the link to the full question with more details

hackerrank.com/challenges/day-of-the-progra..

Feel free to comment your thoughts