首页 > 编程语言 > 详细

pythonchallenge闯关 第15题

时间:2017-10-17 17:10:49      阅读:227      评论:0      收藏:0      [点我收藏+]

15、Hint:(1)whom?

     (2)screen15.jpg

     (3)<!-- he ain‘t the youngest, he is the second --> 他不是最年轻的,是第二年轻的

     (4)<!-- todo: buy flowers for tomorrow -->明天买些花

今天是1.26 明天是1.27 星期二 

1xx6年

2月有29天是闰年

找出生日日期

技术分享
import re
from datetime import *

def isLeapYear(year):
    if year % 4 == 0 and year % 100 != 0:
        return True
    if year % 400 == 0:
        return True
    else:
        return False

LeapYear = []

for i in range(1000, 2000):
    if isLeapYear(i) and re.match(r1[0-9]{2}6, str(i)) and date(i, 1, 27).weekday() == 1:
        LeapYear.append(i)

print LeapYear[-2]
(15)

生日日期是:1756.1.27

以为Url是:http://www.pythonchallenge.com/pc/return/1756.html

结果还我一个404....

查了一下1756.1.27是谁的生日

答案:奥地利音乐大师莫扎特

url:http://www.pythonchallenge.com/pc/return/mozart.html

pythonchallenge闯关 第15题

原文:http://www.cnblogs.com/Zzzml/p/7682637.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!