PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#Because import calendar is far too easy.
#when you hit run you'll be asked for input.
#Please enter the year on the first line.
#Hit return to move to the next line.
#On the second line, please enter 1 to print the first half of the year or 2 to print the second half.
#Example:
#2000
#1
#Would print Jan - Jun of the year 2000.
#Should be able to print any year between 1000 and 9999.
#All calendars will be built using the Gregorian Calendar.
#Comments with bug reports and/or suggestions on ways to overcome the timeout limit, so an entire year can be printed in 1 run would be appreciated.
#Enjoy!
#PS: This is an extention of my "Find The Day of the Week for a Given Date" code.
from __future__ import print_function
import math
import sys
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run