[解决方案] pythonchallenge level 1

http://www.pythonchallenge.com/pc/def/map.html

g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr‘q ufw rfgq rcvr gq qm jmle. sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. lmu ynnjw ml rfc spj.

abcdefghijklmnopqrstuvwxyz

k+2=m

o+2=q

>>>import string

>>>text="""g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr‘q ufw rfgq rcvr gq qm jmle. sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. lmu ynnjw ml rfc spj. """

-1: >>>rule=string.maketrans(string.ascii_lowercase,string.ascii_lowercase[2:]+string.ascii_lowercase[:2])

-2: >>>rule=string.maketrans(‘abcdefghijklmnopqrstuvwxyz‘,‘cdefghijklmnopqrstuvwxyzab‘)

>>>string.translate(text,rule)

"i hope you didnt translate it by hand. thats what computers are for. doing it i
n by hand is inefficient and that‘s why this text is so long. using string.maket
rans() is recommended. now apply on the url. "

>>>a=‘map‘  #apply on the url,url的值是map

>>>string.translate(a,rule)

ocr

http://www.pythonchallenge.com/pc/def/ocr.html

时间: 2024-10-04 03:44:43

[解决方案] pythonchallenge level 1的相关文章

[解决方案] pythonchallenge level 3

http://www.pythonchallenge.com/pc/def/equality.html 根据页面提示:一个小写字母刚刚好被左右3个大写字母包围. 查看页面代码得到需要处理的字符. 将字符复制到文档/tmp/s.txt下 python: import re with open('/tmp/s.txt', 'r') as f: content=f.read() raw_letter=re.findall('[a-z]+[A-Z]{3}([a-z])[A-Z]{3}[a-z]+', c

[解决方案] pythonchallenge level 2

http://www.pythonchallenge.com/pc/def/ocr.html 根据页面提示查看网页源代码,在最后:<!--find rare characters in the mess below:--> <!--%%[email protected]_$^__#)^)&!_+]!*@&^}@[@%]()%+$&[([email protected]%+%$*^@$^!+]!&_#)_*}{}}!}_]$[%}@[{[email prot

[解决方案] pythonchallenge level 4

http://www.pythonchallenge.com/pc/def/linkedlist.php 查看页面源代码或者点击图片 http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing=12345 and the next nothing is 44827 本题将页面中的数字代替url中nothing的值 python: import reimport requestsburl='http://www.pythonchalle

[解决方案] pythonchallenge level 6

查看页面代码,知道找zip www.pythonchallenge.com/pc/def/channel.zip,查看zip下的readme.txt知道从90052,跑一遍知道要收集zip的comment zf = zipfile.ZipFile("/tmp/channel.zip") number = '90052' length = len(zf.infolist()) ret = [] for i in length: text = zf.read(num+'.txt') num

[解决方案] pythonchallenge level 0

http://www.pythonchallenge.com/pc/def/0.html 问题: 2^38 >>> 2**38 >>>274877906944L 输入http://www.pythonchallenge.com/pc/def/274877906944L.html :the L in unnecessary 所以答案:274877906944

Ant build ${renderscript.opt.level}问题解决方案

问题如下: BUILD FAILEDD:\adt-bundle-windows-x86_64-20131030\sdk\tools\ant\build.xml:653: The following error occurred while executing this line:D:\adt-bundle-windows-x86_64-20131030\sdk\tools\ant\build.xml:679: '${renderscript.opt.level}' is not a permit

Java compiler level does not match the version of the installed Java project facet 的解决方案

今天将MyEclipse升级到 10 后,打开原来的工作空间,原来所有的项目都前面都显示了一个小叉叉,代码中却没有任何错误.于从 problems 视图中查看错误信息,错误信息的“Description”显示:Java compiler level does not match the version of the installed Java project facet.之前没有碰到过这个错误,于是 google 了一番,果不其然,很多人都碰到了同样的问题,解决方案有如下两种:方案1. 在项目

Android Call requires API level 11 解决方案

[原因分析] 不详,可能和Run Android Lint有点关系吧.就是创建项目时,我们设置了最低版本API Level,比如我的是8,因此,Eclipse检查我调用的API后,发现版本号不能向低版本兼容,比如我用的"Notification.Builder"是Level 11 以上才有的,自然超过了8,所以提示错误. [解决方案] 右键点击项目->Android tools ->Clear Link Markers.即可临时解决,但是如果调试用的模拟器是低版本的,则在调

pythonchallenge 解谜 Level 6

第六关地址 http://www.pythonchallenge.com/pc/def/channel.html 和前几关一样,首先看网页源码吧.反正不看也没办法... 1 <html><!-- <-- zip --><head> 2 <title>now there are pairs</title> 3 <link rel="stylesheet" type="text/css" href=