Python编程 编写面向对象程序,实现万年历类Calendar,显示用户输入的年、月的星期日历

请编写面向对象程序,实现万年历类Calendar,它可以显示用户输入的年、月的星期日历

写一个类,调用calendar库参考如下代码:

import calendar
class Calendar:
    def __init__(self,year,month):
        self.year=year
        self.month=month
    def display(self):
        print(calendar.month(self.year,self.month))
if __name__=='__main__':
    y = int(input('Input the year:'))
    m = int(input('Input the month:'))
    c=Calendar(y,m)
    c.display()

您好,我是有问必答小助手,您的问题已经有小伙伴帮您解答,感谢您对有问必答的支持与关注!
PS:问答VIP年卡 【限时加赠:IT技术图书免费领】,了解详情>>> https://vip.csdn.net/askvip?utm_source=1146287632