clubs:python_club:python_club_ex_display_calendar
Home | clubs :: cloud club :: python_club :: 3D-Printing | projects :: Proxmox | Kubernetes | scripting | utilities | games
Table of Contents
Python Club Topics - Exercise: Display calendar
Exercise: Display a calendar month
- Output: Display the calendar month for the given month and year
- What you learn from the example:
- Importing and using library modules
- Using the calendar module
- Passing arguments to modules
- Take input from the user
Solution
[1] code:python show
# Program to display calendar of the given month and year
# importing calendar module
import calendar
# To take month and year input from the user
yy = int(input('Enter year: '))
mm = int(input('Enter month: '))
# display the calendar
print(calendar.month(yy, mm))
clubs/python_club/python_club_ex_display_calendar.txt · Last modified: by 127.0.0.1
