Commit 4055d2d9 by BellCodeEditor

auto save

parent 578e41ee
Showing with 15 additions and 8 deletions
total = []
while True:
unit= input("请输入:")
if unit== 'q':
break
y=int(input('请输入年份:'))
m=int(input('请输入月份:'))
d=int(input('请输入日期:'))
days=[31,59,90,120,151,181,212,243,273,304,334,365]
print('这个是日子这一年的第',end='')
if m==1:
print(d,end='')
elif m==2:
print(d+days[m-2],end='')
else:
if y%400==0 or (y%4==0 and y%100!=0):
print(d+days[m-2]+1,end='')
else:
total.append(unit)
print(total)
\ No newline at end of file
print(d+days[m-2],end='')
print('天。')
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment