Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Some cheat? solution in Clear category for Unlucky Days by nakanohito_piyo
import datetime
def checkio(year):
return sum(1 for month in range(1,12+1) if datetime.date(year,month,13).weekday()==4)
if __name__ == '__main__':
#These "asserts" using only for self-checking and not necessary for auto-testing
assert checkio(2015) == 3, "First - 2015"
assert checkio(1986) == 1, "Second - 1986"
March 5, 2016