Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Unlucky Days by Merzix
from datetime import datetime
def checkio(year):
return sum(datetime(year, month, 13).weekday() == 4 for month in range(1, 13))
if __name__ == '__main__':
assert checkio(2015) == 3, "First - 2015"
assert checkio(1986) == 1, "Second - 1986"
Nov. 30, 2018
Comments: