Python Program To Show Calendar of a Year

By | August 15, 2019

Task: Python Program To Show Calendar of a Year. This Python programming tutorial uses predefined ‘calendar’ madule to display calendar of a whole year.

Python program to show calendar for a given year

Python program to show calendar for a given year

The user will input a year as 2019. This Python calendar program will show the complete calenar of that year.

The Source Code of Python Program To Show Calendar of a Year

# Write a Python program to output
# a required calnendar on the basis
# of input year.

# author : www.EasyCodebook.com
# for Perfect Programming Tutorials

# *** Start of program ***

# import the calendar module  
import calendar  
# Get the month and year from the user
calendar_year = int(input("Enter the year for calendar: "))  

# output the required calendar  
print(calendar.calendar(calendar_year))

 

Leave a Reply

Your email address will not be published. Required fields are marked *