Solve Problems in http://www.pythonchallenge.com
result: http://www.pythonchallenge.com/pc/return/evil.html
from PIL import Image
from PIL import ImageDraw
the hint is in the html'title odd, even
result: http://www.pythonchallenge.com/pc/return/5808.html
with pycharm IDE, I can debug the code easier.
the method of find rule of a is:look at a[i - 1], do count
1
the next is one 1: 11
the next is two 1: 21
the next is one 2 one 1: 1211
the next is one 1 one 2 two 2: 111221
the next is three 1 two 2 one 1: 312211
result:http://www.pythonchallenge.com/pc/return/bull.html
the html knowledge learn from 8 help me.
result: http://www.pythonchallenge.com/pc/return/good.html
un:huge pw:file
html knowledge: img-usemap="#--", map, area, sharp, poly, coords.
import bz2
result: http://www.pythonchallenge.com/pc/def/integrity.html
from PIL import Image
use PIL module to find the block's pixel with getpixel(), then use chr() to translate the code
result: http://www.pythonchallenge.com/pc/def/oxygen.html
import zipfile
zip file not only can bi unzip, can contains a lot of comments.
every level will play with a new lib.
result: http://www.pythonchallenge.com/pc/def/channel.html
import pickle
every line elements add up to 96
result: http://www.pythonchallenge.com/pc/def/peak.html
import requests
this is a http client lib with to do http request.
result: http://www.pythonchallenge.com/pc/def/linkedlist.html
transfer to: http://www.pythonchallenge.com/pc/def/linkedlist.php
result: http://www.pythonchallenge.com/pc/def/equality.html
result: http://www.pythonchallenge.com/pc/def/ocr.html
- ord()
- chr()
- isalpha()
- isalnum()
True: 'a'.isalpha() True: 'a'.isalnum()
False: '.'.isalpha() False: '.'.isalnum()
True: '1'.isalnum() False: '1'.isalpha()
pow(2,3)