原文:python判斷輸入日期是該年的第幾天

.輸入日期,判斷日期是該年度的第幾天 iyear int input 請輸入年: n imonth int input 請輸入月: n iday int input 請輸入日: n def checkYear iyear : return iyear and iyear or iyear tol day for i in range , imonth : tol day lis i if i i ...

2019-07-03 20:46 0 3741 推薦指數:

查看詳情

Python練習題 004:判斷日期該年第幾天

Python練習題 004】輸入某年某月某日,判斷這一天是這一年的第幾天? ---------------------------------------------- 這題竟然寫了 28 行代碼!而且還不包含輸入數據的驗證(只能假設輸入日期是嚴格按照格式來的)。但我堅信,一定有更簡潔 ...

Thu Oct 13 07:13:00 CST 2016 3 12273
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM