[ create a new paste ] login | about

Link: http://codepad.org/MuBsSX7M    [ raw code | output | fork ]

caq - Python, pasted on Jul 7:
1
2
3
4
5
6
7
8
9
import calendar

MON, TUE, WED, THU, FRI, SAT, SUN = 0, 1, 2, 3, 4, 5, 6
dict = {MON:0, TUE:0, WED:0, THU:0, FRI:0, SAT:0, SUN:0}
for y in range(2008, 2408):
  for m in range(1, 13):
    w = calendar.weekday(y, m, 13)
    dict[w] = dict[w] + 1
print dict


Output:
1
{0: 685, 1: 685, 2: 687, 3: 684, 4: 688, 5: 684, 6: 687}


Create a new paste based on this one


Comments: