"""
Calendar 模塊有很廣泛的方法用來處理年曆和月曆,例如打印某月的月曆。
"""
# 引入日曆模塊
import calendar
# 輸入指定年月
yy = int(input("輸入年份: "))
mm = int(input("輸入月份: "))
# 顯示日曆
print(calendar.month(yy, mm))
請編寫程序,用於生成指定日期的日曆
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
輸入一個奇數,然後判斷最少幾個 9 除於該數的結果爲整數
i = int(input("請輸入一個奇數:")) n = "9" a = True while a: if int(n)%i != 0: n += "9" else: a =