Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Daynum = 1
- monthpos = 1
- daypos = 2
- year = 1901
- count = 0
- while year < 2001:
- while monthpos < 13:
- if daypos%7 == 0:
- count = count + 1
- if monthpos == 1 or monthpos == 3 or monthpos == 5 or monthpos ==7 or monthpos==8 or monthpos==10 or monthpos==12:
- daypos = daypos + 3
- monthpos = monthpos + 1
- elif monthpos == 4 or monthpos==6 or monthpos==9 or monthpos==11:
- daypos = daypos + 2
- monthpos = monthpos + 1
- else:
- if year%4 > 0:
- daypos = daypos
- monthpos = monthpos + 1
- else:
- daypos = daypos + 1
- monthpos = monthpos + 1
- monthpos = 1
- year = year + 1
- print(count)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement