Python is an object-oriented, interpretive programming language, with the source code and interpreter CPython adhering to the GPL, and the Python syntax is concise and clear.
The syntax is concise and clear, so what are some interesting things we can do with a small amount of Python code? Warm tip: The end of the text must be seen.
First, painting love Confession
1, the graph is composed of a series of points (x, y) of the curve, because X, y satisfies a certain relationship, so we can build a model, set up expressions expression, when satisfied, two for loop (for X in Range;for Y in range) will be printed per row per column.
2. Python Code and comments:
A line of code to clarify the idea of implementation:
It looks like three rows, and writing a line of Python code in the IDE can be done,
This diagram is a static diagram, the effect is not satisfactory, then we make it into a dynamic diagram and to achieve the text of the confession? (You can change the letter content yourself)
The code after the change is as follows:
Second, express query tool
1, this Python small project needs to use JSON and requests two libraries, also need to call the API.
2. Code Annotations:
3. Query effect:
Third, the Python crawler entry-level tutorial image crawl
1, many because of interest and learn Python most of the friends are to see others crawl video, pictures it, I have seen others crawl small films, I have dynamics.
2. Python Code:
3.
Four, Buddha Town Building
The code is a little bit ... But the effect came out. In the same vein, you can draw other graphics, which requires your own imagination.
Five, do animation hand-painted
Example:
Source:
Six, (the axis) repeatedly see violence assistance
Repeatedly see I believe that we have played, not much introduction. To complete its assistance, what can we think of first?
Image recognition, mouse simulation. Image recognition does not necessarily have to be a very difficult algorithm. OpenCV This divine framework, easy to help us, to be good at using tools.
The Python Win32 API enables mouse simulation clicks.
Want to crack QQ repeatedly look, must config.py in the configuration into QQ repeatedly see the corresponding configuration, but the configuration is what I will not speak out. If you can do it on your own, steal the joy, do not preach, if you must say that you have to show off the teeth everywhere ... I do not say anything, after all, the small part is also doing so.
Source:
A few Python small cases, fall in love with Python programming!