Python real small cases, fall in love with Python language

Python is an interpreted object-oriented programming languages, source code and the interpreter CPython comply with the GPL, Python syntax is simple and clear.

Grammar simple and clear, so we use a small amount of Python code which interesting things to do? Tips: must-see end of the article.

A painting of love confession

1, the graphics are a series of points (X, Y) curve constituted, X, Y satisfy a certain relationship, so we can build the model, the establishment of the expression expression, when met, two for loops (for X in range; for Y in range) will be printed in each row of each column.

2, Python code Notes:

Clear thinking a line of code to achieve:

Appears to be three lines, writing a line of code in Python IDE, can be realized, as shown:

This picture shows the still pictures, effects and unsatisfactory, then we make it into a motion picture and realize how graphic confession? (You can change the contents of the letter itself)

After changing the code is as follows:

Second, the Express Query Tool

1, this Python small projects need to use json requests with two libraries, the need to call the API.

2, the code Note:

3, the query results:

!

Third, the entry-level tutorial Python crawling reptile pictures

1, because a lot of interest in learning Python and friends mostly see someone crawling video, pictures, and I was seeing someone else before crawling small movie, I have the dynamics.

2, Python Code:

3, the effect of FIG.

Fourth, the Buddha Town House

That code is a bit ... but the effect is out. Similarly, other graphics can be painted, this depends on your own imagination.

Fifth, do hand-drawn animation

Example:

Source:

VI (finale) Lianliankan violence aid

Lianliankan I believe we have played, little introduction. To complete its subsidiaries, first of all we can think of what?

Image recognition, mouse emulation. What can image recognition algorithms need not be very difficult. OpenCV this god-level framework, easily help us get to make good use of tools.

By the python win32 API that can be achieved simulate mouse clicks.

Want to break the QQ Lianliankan, must config.py in the configuration change QQ Lianliankan corresponding configuration, but the configuration is what I will not say it. If you can do it on their own, like smiling, do not preach, say if you have to show off claws everywhere ... I do not spade, after all, small series are doing it.

Source:

大家在学python的时候肯定会遇到很多难题,以及对于新技术的追求,这里推荐一下我们的Python学习扣qun:784758214,这里是python学习者聚集地!!同时,自己是一名高级python开发工程师,从基础的python脚本到web开发、爬虫、django、数据挖掘等,零基础到项目实战的资料都有整理。送给每一位python的小伙伴!每日分享一些学习的方法和需要注意的小细节

点击:python技术分享交流

Guess you like

Origin blog.csdn.net/zhizhun88/article/details/90643046