本月博客排行
-
第1名
Xeden -
第2名
fantaxy025025 -
第3名
bosschen - paulwong
- johnsmith9th
年度博客排行
-
第1名
青否云后端云 -
第2名
宏天软件 -
第3名
gashero - gengyun12
- wy_19921005
- vipbooks
- e_e
- benladeng5225
- wallimn
- ranbuijj
- javashop
- jickcai
- fantaxy025025
- zw7534313
- qepwqnp
- robotmen
- 解宜然
- ssydxa219
- sam123456gz
- zysnba
- sichunli_030
- tanling8334
- arpenker
- gaojingsong
- xpenxpen
- kaizi1992
- wiseboyloves
- jh108020
- xyuma
- ganxueyun
- wangchen.ily
- xiangjie88
- Jameslyy
- luxurioust
- mengjichen
- lemonhandsome
- jbosscn
- nychen2000
- zxq_2017
- lzyfn123
- wjianwei666
- forestqqqq
- ajinn
- siemens800
- hanbaohong
- 狂盗一枝梅
- java-007
- zhanjia
- 喧嚣求静
- Xeden
最新文章列表
PythonChallenge Level 0~4
PythonChallenge Level 0: http://www.pythonchallenge.com/pc/def/0.html
计算 2 的 38 次幂 将得到的结果替换URL中数字0
print 2**38
PythonChallenge Level 1: http://www.pythonchalleng ...
pythonchallenge 20 code (python2.7)
absolutely lost...
reference:http://past.makto.me/post/2011-11-26/18573723
>>> import urllib
>>> web=urllib.urlopen('http://butter:fly@www.pythonchallenge.com/pc/hex/unreal.jpg')
> ...
Pythonchallenge Level 19 (python 2.7)
After looking into the source code
some key words attracted me: 'encoding:base64' 'indian.wav'
another interesting hint is about the pic: the colours for the the mainland and ocean are exchanged
Note: ...
Pythonchallenge Level 18 (python 2.7)
the difference between these two images are brightness level, hence go to the 'brightness.html'
download 'delta.gz' and unzip the file
look into the dataset, the regular stuff would come out...
>&g ...
Pythonchallenge Level 17 (python 2.7)
I spent much more time on this problem.
the information behind this pic:
1. the image from level4
2. lots of cookies
==> go into the corresponding cookies of level4 and you will find a hint:
'you+s ...
Pythonchallenge Level 16 (python2.7)
This rule in my view is not so easy to figure out....
however, the code is generated depends on others' solution:
>>> data=[]
>>> image=Image.open('/home/****/Downloads/mozart.gif')
...
Pythonchallenge Level 15 (python2.7)
what kinds of information can you remember for a calendar? year?date?month?weekdays?leapyear?... try to find these from the image
the code is:
>>> import calendar
>>> for year in rang ...
Pythonchallenge Level 13 (python2.7)
New stuff: xmlrpclib
#get the connection:
>>> from xmlrpclib import ServerProxy
>>> s=ServerProxy('http://www.pythonchallenge.com/pc/phonebook.php')
>>> s.system.listMethods( ...
Pythonchallenge Level 12 (python2.7)
For this issue,
firstly, I downloaded the image, then I found its name was 'evil1.jpg'
ps: it would be perfect if you hold kind of curiosity! lol... because you may want to try what will happen if you ...
Pythonchallenge Level 11 (python2.7)
My initial thought was to find certain rules in the image dataset, but failed.
then I tried to divide the dataset into two groups based on the data position in the binary dataset, but the new image's s ...
Pythonchallenge Level 10 (python2.7)
At the beginning, I thought this would follow the rule: f(n+1)=f(n)+f(n-1)
It turned out to be wrong...
the damn look-and-say sequence....
the main problem is the implementation of this lovely algorith ...
Pythonchallenge Level 9 (python2.7)
The given hints are useful!
>>> first=[146, 399, 163, 403, 170, 393, 169, 391, 166, 386, 170, 381, 170, 371, 170, 355, 169, 346, 167, 335, 170, 329, 170, 320, 170, 310, 171, 301, 173, 290, 17 ...
Pythonchallenge Level 8 (python2.7)
If you are familiarly with 'bz2' module, it would be really easy!
>>> import bz2
>>> u=bz2.decompress('BZh91AY&SYA\xaf\x82\r\x00\x00\x01\x01\x80\x02\xc0\x02\x00 \x00!\x9ah3M\x07& ...
Pythonchallenge Level 7 (python2.7)
In my opinion, this challenge needs more patience and observation!
>>> import Image
>>> image=Image.open('/homeDownloads/oxygen.png')
>>> data=image.convert('L').getdata()
...
Pythonchallenge Level 6 (python2.7)
download the zip file from ..../channel.zip
extract the channel.zip and read the read.txt
my code:
>>> import re
>>> value=90052
>>> comments=[]
>>> z=zipfile.ZipFi ...
Pythonchallenge Level 5 (python2.7)
import pickle
f=open('banner.p')
contents=pickle.load(f)
for obj in contents:
... string=''
... for o in obj:
... string=string+o[0]*o[1]
... print string
Answer: channel.html
Re ...
写个小工具,抓网页的源代码
很简单的一个方法,以后不要每次粘贴一次了
#!/usr/bin/env python
import sys,urllib
def downloadPage(filename,url):
wp = urllib.urlopen(url)
fp = open(filename,'w')
content = wp.read()
fp.write( ...
pythonchallenge.com第三题
pythonchallenge.com第二题
#!/usr/bin/env python
def countchar(filename,count):
fp = open(filename,'r')
listcount = [0]*256
tmp = fp.read(1)
str = ''
while tmp:
lis ...
自己写的关于www.pythonchallenge.com/的代码答案
前两天发现了个练习python的地方 ,www.pythonchallenge.com/ 挺有意思的,每天写点python,顺便把答案贴出来
自己写的关于www.pythonchallenge.com/的代码答案