Draw up a monthly calendar for a given month
in a given year. It is not allowed to use modules from The
Python Standard Library.
monthly calendar
The first line of the calendar is the English name of the month (written in lowercase letters), followed by a space and the year. The entire text should be centered and written over about 20 positions. The next line contains the consecutive weekdays, each shortened to two small letters, starting with Sunday and separated by spaces. Then follow all dates of the month on different lines, neatly aligned with the correct day on which these dates fall. The days are always right aligned and written over two positions, with a space between the different days as it was also used for the weekdays in the header. The output of the calendar contains no blank lines, and there are never spaces at the end of a line.
For a given day
When drawing up the calendar, remember that February has a different
number of days, depending on whether the specified year is a leap year or
not
The first line of the input contains an
integer
output
For each test case a calendar must be drawn
up for the month
Input:
3 2 2012 3 2012 2 2013
Output:
february 2012 Su Mo Tu We Th Fr Sa 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 29 march 2012 Su Mo Tu We Th Fr Sa 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 29 30 31 february 2013 Su Mo Tu We Th Fr Sa 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