Answers for "python calendar module"

4

how to make sun as first day in calendar python

import calendar

# to set the first weekday to SUNDAY.
calendar.setfirstweekday(calendar.SUNDAY)
print(calendar.month(2020, 10 ))
Posted by: Guest on October-02-2020
1

how yo make a calendar in pytohn

please check out my video also - https://www.youtube.com/watch?v=ZA3XAZ-dB5M&t=9s
please subscribe my channel - https://bit.ly/2Me2CfB

# importing the calendar module
import calendar

#taking input of year from the user
y = int(input("ENTER THE YEAR : "))

#taking input of month from the user
m = int(input("ENTER THE MONTH : "))

# making calendar in the 'cal' variable
cal = calendar.month(y, m)

# print the cal (calendar is stored in the cal variable)
print(cal)
Posted by: Guest on July-09-2021
2

calendar program in python

import calendar 

print("Your Calendern n ")

y = int(input("Enter the Year : "))
m = int(input("Enter the month : "))
try:
    mycalender = calendar.month(y , m)
    print("n", mycalender)
except IndexError:
    print("Its out of range")
Posted by: Guest on November-06-2020
0

python calendar table view

class CustomHTMLCal(calendar.HTMLCalendar):
    cssclasses = [style + " text-nowrap" for style in
                  calendar.HTMLCalendar.cssclasses]
    cssclass_month_head = "text-center month-head"
    cssclass_month = "text-center month"
    cssclass_year = "text-italic lead"
Posted by: Guest on December-03-2020
1

python calendar

import calendar
yio = int(input('Input a month'))
s = int(input('Input a year'))
print(calendar.month(s,yio))
Posted by: Guest on October-26-2020
0

python calendar module

import calendar

yy =2021
mm =10
print(calendar.month(yy, mm))

#1-jan
#2-feb
#3-mar
#4-apr
#5-may
#6-june
#7-july
#8-agt
#9-sep
#10-oct
#11-nov
#12-dec
Posted by: Guest on November-18-2021

Python Answers by Framework

Browse Popular Code Answers by Language