Python开发

# mongdb

```
try:
    year = int(input('请输入年份,格式为1900'))
    month = int(input('请输入月份,格式为01').strip('0'))
    day = int(input('请输入日期,格式为1'))
    i = 0
    daymonth = 0
    dayear = (year - 1900) * 365
    for oneyear in range(1900, year + 1):
        if (oneyear % 4 == 0 and oneyear % 100 != 0) or oneyear % 400 == 0:
            dayear += 1
    for i in range(1, month):
        if i in [1, 3, 5, 7, 8, 10, 12]:
            daymonth = daymonth + 31
        elif i == 2:
            if (year % 4 == 0 and year % 100 != 0) or year % 400 == 0:
                daymonth = daymonth + 28
            else:
                daymonth = daymonth + 29
        else:
            daymonth = daymonth + 30
    totalday = dayear + daymonth + day
    if totalday % 5 in [1, 2, 3]:
        print('打鱼')
    else:
        print('晒网')
except:
    print('非法输入')

```
广告
© 版权声明
THE END
喜欢就支持一下吧
点赞0
分享
评论 抢沙发