Display calendar

To display calendar of a year here,we are using a calendar function and to display a particular month of a year ,we are using a month function from calendar module of python.

#import the calender module

import calendar

print("To display a calender of given month")
yy=int(input("Enter  a year"))
mm=int(input("Enter  a month to be display"))
print(calendar.month(yy,mm))   #Month module display the calender of given month of given year


print("To display a calender of given year")
yy1=int(input("Enter  a year"))
print(calendar.calendar(yy1))  # Display module display the calender of given year

 

%d bloggers like this: