Write a Python program to print the calendar of a given month and year
I have used python 3.7 compiler for debugging purpose.
import calendar year = int(input("Input the year : ")) month = int(input("Input the month : ")) print(calendar.month(year, month))
Result:
Input the year : 2018
Input the month : 10
October 2018
Mo Tu We Th Fr Sa Su
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
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
I have used python 3.7 compiler for debugging purpose.
Result:
Input the year : 2018
Input the month : 10
October 2018
Mo Tu We Th Fr Sa Su
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