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))

 

Loading

One thought on “Python Program To Show Calendar of a Year

  1. Pingback: Python Program To Show Calendar of a Year | EasyCodeBook.com 2019 – Daily Tech Blog

Leave a Reply

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