自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 收藏
  • 关注

原创 [Python Challenge] - Q9

<br />Q9:Connec the dots<br /> <br />http://www.pythonchallenge.com/pc/return/bull.html<br /> <br />打开网页是一张画着点的图片,网页的题目说是要连接点,所以我以为是要把这些点连起来。后来打开源代码看到点实际已经被定义好了,直接使用PIL的方法就行,这才发现要连接的不是画的点,得到的图像(结果)是“bull”。<br /> <br />#Python Challenge Q9 -- connect the

2011-01-30 22:29:00 713

原创 [Python Challenge] - Q8

<br />Q8:working hard? - Where is the missing link?<br /> <br />http://www.pythonchallenge.com/pc/def/integrity.html<br /> <br />打开网页源文件,看到注释是加密后的用户名和密码,而图片的蜜蜂提示用bz2解密。<br /> <br />IDLE 2.6.2 >>> import bz2>>> un = "BZh91AY&SYA/xaf/x82/r/x00/x00/x

2010-08-23 21:24:00 694

原创 [Python Challenge] - Q7

<br />Q7: smarty<br /> <br />http://www.pythonchallenge.com/pc/def/oxygen.html<br /> <br />网页只有一张图片,答案在图片中间的那一条灰度。<br /> <br />PS:Python没有自己的图片处理模块需要安装PIL。<br /> <br />代码:<br />>>> #Editor: IDLE>>> import Image>>> import sys>>> img = open ('oxygen.pn

2010-08-21 21:23:00 581

原创 [Python Challenge] - Q6

<br />Q6: now there are pairs<br /> <br />http://www.pythonchallenge.com/pc/def/channel.html<br /> <br />打开网页源文件可以看到“zip”的提示,下载得到channel.zip文件包。我解压文件后按照readme的提示写了一段代码用于找到其中正确的数字,得到结果“Collect the comments.”,原来答案在zip文件的注释里。得到结果:HOCKEY,打开hockey.html,得到“it's

2010-08-19 22:16:00 505

原创 [Python Challenge] - Q5

<br />Q5:peak hell - pronounce it <br /> <br />http://www.pythonchallenge.com/pc/def/peak.html<br /> <br />通过查看源代码,得到注释信息peak hell sounds familiar ?和一个文件。这个我真的没看懂,所以查了一下,原来pick和hell连读的话很像pickle,pickle模块用于数据连续化, 便于保存传输。banner.p便是使用pickle.dumps()的结果,难怪我没看懂。看

2010-08-19 11:56:00 754

原创 [Python Challenge] - Q4

<br />Q4:follow the chain<br /> <br />http://www.pythonchallenge.com/pc/def/linkedlist.php<br /> <br />先点图片,然后按照网页提供的数字网页向下点,注意中间有个网页有分支。<br /> <br />代码:<br />from HTMLParser import HTMLParserimport urllibimport stringimport redef run (num): url

2010-08-18 23:22:00 454

原创 [Python Challenge] - Q3

<br />Q4:re--One small letter, surrounded by EXACTLY three big bodyguards on each of its sides. <br /> <br />http://www.pythonchallenge.com/pc/def/equality.html<br /> <br />在一封信中,一个小写字母被三个大写字母环绕着,值得注意的是“EXACTLY”,意思是大写字母是有且只有三个。另外,网页的title就是re,我猜测是在提示我们要用re

2010-08-18 22:36:00 482

原创 [Python Challenge] - Q2

<br />Q2:PC----ocr recognize the characters. maybe they are in the book, but MAYBE they are in the page source.<br />http://www.pythonchallenge.com/pc/def/ocr.html<br /> <br />提示说,可能在网页源文件中,打开源文件,可以看到一大堆“}@[@%]()%+$&[(_@%+%$*^@$^!+”之类的注释。同时上面还有一行注释说find ra

2010-08-18 22:23:00 440

原创 [Python Challenge] - Q1

<br />Q1:What about making trans?everybody thinks twice before solving this.<br /> <br />http://www.pythonchallenge.com/pc/def/map.html<br /> <br />题目的意思是将给定的字符串按照图中"K-M O-Q E-G"的方式替代,于是有了下面的方法:<br /> <br />代码1:<br />str="g fmnc wms bgblr rpylqjyrc gr zw

2010-08-18 21:50:00 617

原创 [Python Challenge] - Q0

<br />注:The Python Challenge 是一个关于Python编程的网页闯关游戏,我作为Python新手,正好拿来学习学习。<br /> <br />Q0: warming up 热身<br />http://www.pythonchallenge.com/pc/def/0.html<br /> <br />求2的38次方,然后将网址中的0改为274877906944即可。<br /> <br />>>> 2**38274877906944L<br /> <br /> 

2010-08-18 21:11:00 399

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除