Q:

Python program to display calendar

belongs to collection: Python Basic Programs

0

It is simple in python programming to display calendar. To do so, you need to import the calendar module which comes with Python.

import calendar  

 And then apply the syntax  

(calendar.month(yy,mm)) 

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

import calendar  
# Enter the month and year  
yy = int(input("Enter year: "))  
mm = int(input("Enter month: "))  
  
# display the calendar  
print(calendar.month(yy,mm))  

Output:

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Python Program to check if a Number is Positive, N... >>
<< Python program to convert Celsius to Fahrenheit...