Python Challenge Customs Tips (0)

Source: Internet
Author: User
Tags pow

Having recently started developing with OpenERP, there was little progress on the Python language itself and decided to use the free time to do a little python exercise.

Finally, a programming game called Python Challenge (http://www.pythonchallenge.com) was found.

This game age is very long, but it is said that the problem of difficulty to the back is very large, I very much doubt will be in some of the level card for an extended period of time, anyway, try to do see it, can do how much, now horizontal must not do the front of the simple, and so on the level up and then slowly challenge behind the level.

The first is actually the No. 0 level, the picture is a number 238, below the hint: try to change the URL address. There is no difficulty, just follow the prompts to change the URL to a part of the 238 results should be OK. This topic itself is very simple, in order to enrich a little content, and then some divergent thinking good.

First by the URL, now the English abbreviation is too many, but many English abbreviations I only know what it is, impetuous mentality has made me do not know what its full name is. For example, "Wi-Fi", I believe most of the mobile phone users can not leave it, but do not know what its full name, a bit of English-based people (such as i) probably can guess "wi" is the abbreviation of "Wireless", but almost do not care about "Fi" is how to come. Degree Niang later know, originally "fi" Is "Fidelity" (fidelity) abbreviation, so "Wi-Fi" full name is "Wireless Fidelity" (Wireless fidelity Technology). By the way, add the full name of the URL: Uniform Resource Locator (Uniform Resource Locator).

Next, use Python to calculate 238. Input 2**38 directly, you can get the result 274877906944. When referring to other answers, there is another way to find the exponentiation: Pow (2,38). In some of the old Python tutorials I saw that the POW () function had to be imported into the Math module, but I could still use POW () without importing. Finally, after finding the answer, we went to the Python official document to confirm that the final conclusion: Although there is a POW () function in the math module, there are some functions in Python called built-in Functions (built-in function), There is also a POW (). The two POW () is not exactly the same, where Math.pow () transforms the parameters into a float, and the built-in POW () and * * are the same . For example, 2**2 and POW (2,2) result in 4, and after import math, the result of Math.pow (2,2) will be 4.0.

To start with, this clearance password is 274877906944, then we just have to change the No. 0 level of the URL address of 0 to 274877906944 can formally enter the 1th.

Python Challenge Customs Tips (0)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.