This is my calendar code in Python and I have saved it to my folder as calendar.py
.
import calendar
a = calendar.month(2016, 3)
print (a)
print
Had the same challenge. If the issue is not with a similar file name, please note that the prevmonth
and nextmonth
functions have been deprecated https://bugs.python.org/issue35406
You can still access them using the _prevmonth and _nextmonth functions, but note that they don't check if the month is valid (kindly refer to the link posted above for details), so you may need to write your assert statement before using them
MONTH_NUMBER = 12 # enter your month number here
assert MONTH_NUMBER in range(0,13)
# continue the rest of your code