Python Challenge题解 (更新到33关)

我的Python Challenge题解,源代码请移步https://github.com/cloudzfy/pychallenge

This is a solution for Python Challenge, a puzzle game website, a best place for Python beginner.

  • Level 0 warming up

    • Just do the calculation 238 and put it in the URL address.
  • Level 1 What about making trans?

    • Apply dictionary mapping to the encrypted text.
  • Level 2 ocr

    • Check the comments in HTML source code, and find the rare characters.
  • Level 3 re

    • Check the comments in HTML source code, and find the substring with XXXxXXX.
  • Level 4 follow the chain

    • There is a link on the image. Use the number as a clue to fine the tail of the linkedlist.
  • Level 5 peak hell

    • "Peak hell" sounds like pickle. Download the data from  label and use pickle to extract information.
    • Trick: When printing the data from pickle, you may find the correlation between each character and its frequency.
  • Level 6 now there are pairs

    • Download the ZIP file channel.zip with a linkedlist based on the names of text files. Check readme.txt, You may use zip.getinfo().comment to retrieve comments of each text file in the ZIP.
  • Level 7 smarty

    • Check the gray bar in the image file, using Image. Note for gray color, R == G == B. Transfer the color into ASCII.
  • Level 8 working hard?

    • The bee has link with username and password, which can be found in the HTML comment. Use bz2 to decompress.
  • Level 9 connect dots

    • Connect the dots according to the coordinates of HTML comments, one by one.
  • Level 10 what are you looking at?

    • Check the HTML comments for len(a[30]), it is a count-and-say.
  • Level 11 odd even

    • The image provided could be sliced by odd and even. If you cannot find the clue, adjust the brightness of your screen.
  • Level 12 dealing evil

    • Clue is hidden in the names of images. Since it is evil1.jpg, how about evil2.jpgevil3.jpg, or even evil4.jpg. Not all the image file are image format. Do the file partition just like dealing with the cards.
  • Level 13 call him

    • You may find the number 5 is clickable. Use xmlrpclib to call him.
  • Level 14 walk around

    • Sort the image file just like the bread.
  • Level 15 uzi

    • Use calendar.isleap and datetime.date, you may find it easy to get the year. Then check the history for Mozart and his father.
  • Level 16 let me get this straight

    • Get the image straight as the hint said. Use a[1:].
  • Level 17 eat?

    • You may find the image at the corner fimiliar. Check the browser cookies on Level 4, go through the linkedlist and gather the information hidden in the cookies.
    • Call Leopold using the phone.
    • Manually create the HTTP request with cookie the+flowers+are+on+their+way, Mozart's father will reply anyway.
  • Level 18 can you tell the difference?

    • First question is easy, brightness is the difference.
    • Download the file deltas.gz and unzip, compare the differences between the two parts of the text file, use unhexlify, and get three images finally.
  • Level 19 please!

    • Notice there is an email hidden in the HTML comments. By decoding the attachment, indian.wav was saying something about sorry. *Notice there are some redundent information in the data of the WAVE file, by simply removing it and changing the framerate, we can get the clue idiot.
  • Level 20 go away!

    • By inspecting the image file unreal.jpg, you may find the response header is highly suspicous.
    • The Range field is unusual in the response headers, by adding and testing different number ranges of the field in an HTTP request, you will get a file talking about what you should do in the next level.
  • Level 21 package.pack

    • By checking the data inside the package, you may find it familiar. It is a file compress many times by ZLIB and BZ2 directly and reversely.
    • The log is more important than the original file.
  • Level 22 emulate

    • Download the GIF file white.gif, it is an animated GIF file, and there is a bright dot hidden inside. What we need to do is to figure out the trajectory of the dot's movement.
  • Level 23 what is this module?

    • This is actually a bonus level. Check this function in Python for more details.
  • Level 24 from top to bottom

    • Use Breath-First Search or Depth-First Search to check the path of the maze from top to bottom. BLACK color marks the entrance and exit, WHITE color marks the wall. The colors of the path are the data of a ZIP file.
  • Level 25 imagine how they sound

    • Download the 25 WAVE files, which are almost noise by the way. Actually they are parts of the images, like a jigsaw.
  • Level 26 be a man - apologize!

    • The ZIP file mybroken.zip was modified, and must be corrected before unzip.
    • The title "apologize" reminds us about Mozart's father. You may send an email to apologize, and will get the MD5 of the broken ZIP file.
  • Level 27 between the tables

    • Check the hint and download the GIF file zigzag.gif, extract the data from the GIF file, eliminate the redundant information, and convert the content by GIF palette, you may find the link, username, and password to the next level.
  • Level 28 many pairs ring-ring

    • Notice the picture shown has some patterns hidden behind, there are bars on it.
    • Split the image and get the differences for each pair, you may find the message whodunnit().split()[0] ?
  • Level 29 silence!

    • Keep quiet and you may find the blanks hidden after the HTML code!
    • Extract and convert to ASCII code, message will be revealed.
  • Level 30 relax you are on 30

    • Download the CSV file yankeedoodle.csv. Unfortunately the CSV module in Python doesn't work well for this process, so you may do it on your own.
    • The data can be converted to Image file by setting the mode to floating point pixels F. The image tells exactly how to decode this information, n = str(x[i])[5] + str(x[i+1])[5] + str(x[i+2])[6].
    • Decode the original data, and you may find the hint to the next level.
  • Level 31 where am I?

    • This is a puzzle based on knowledge, use Google Image search, you may find it is in Koh Samui, Thailand.
    • Click the image with username kohsamui and password thailand, the new page shows an image of Mandelbrot set. Record the interations when computing the function in each pixel.
    • The interations can be converted to an image with 8-bit pixels mode, which, is the Arecibo message.
    • Amazing! Isn't it?
  • Level 32 etch-a-scetch

    • This is about solving two nonogram. If you are not familiar with the concept and algorithms, just Google it.
    • Finally you may get a picture with snake, which is python on it. Check free speech, which follows with beer.
  • Level 33 33 bottles of beer on the wall

    • Download the image beer2.png, and carefully read this:

      If you are blinded by the light, remove its power, with its might. Then from the ashes, fair and square, another truth at you will glare.

    • Each time, if the pixels could fit into a square, check the brightest pixels and log the information. Then remove the brightest pixels and go to the next round.

  • Level 34 Temporary End


你可能感兴趣的:(github)