White learn Python (1): Opening

Life is short, I used Python

introduction

Hello everyone, I am more likely we are all familiar, unfamiliar please to face the wall (now time to familiarize yourself) ~

Simply introduce myself, I am the only author geeks excavator, an oily Java programmers [rotten eggs or something to put up, waiting for me to make a parachute

Ah Hey ~ your self-introduction on the word ah? ? ?

I am happy, or you bite me

Although I am proficient about Java versatile, but I am now writing serialized Python tutorial, ah, it did not seem a P use

To say the things you may not know, this year (2019) Python has aged 28 years, was not taken aback, never expected, Python may be larger than the age you here. But I still did not large (look playfully).

Today, Python is already a need to understand the programming language, Python advantages in the field of reptiles, machine learning more and more obvious.

Shandong and Beijing have been identified and put into the Python programming based on the contents of system information technology courses and college entrance examination. In particular, the latest edition of Shandong Province sixth grade primary school information technology teaching material also joined the Python content, schoolchildren came into contact with the Python language! !

If you do not learn, really even a child may later have to beat the

Then why do not you follow me, follow me along.

I'm not a Python Daniel, but I'm happy to share ah, we can be a few minutes out of every day, I see a few XBB, you Zhibuding bone Qing Qi, Renduermo get through, and was put on life pinnacle (Gou rich, Do not forget themselves)

Environment to build

Currently Python 2 official has announced support stopped in 2020, what, you have to learn Python 2, go left them off.

Construction of Python in the windows environment is very simple, accessible Python's official website ( https://www.python.org/ ), I play the English level of primary school, find DownLoad, tap:

On the second page to choose their own system

Xiao Bian is the computer is win10, so I chose this version of the red box, and then tap to start the download, if too slow, then you can use Thunder download (Who told you to talk about the Thunder back, I remember the advertising costs)

After the download is complete is an exe file, simply double-click to install just fine, there is need to be modified under the installation path, although it is in English, but the operation is very simple, all the way next in the end just fine, after a successful installation can be opened or cmd powershell command line, enter the following command:

python --version

After the execution should appear currently installed version of Python information

You can see, the installed version is 3.7.4, and we just downloaded version of the agreement [nonsense

Development tools can use jetbrains provided PyCharm or VSCode provided by Microsoft.

Xiao Bian to PyCharm example to describe how to build (because simple ah, VSCode also installed several plug-ins to use, I am so lazy, just do not talk)

Go to the official website to download ( https://www.jetbrains.com/zh/pycharm/promo/?utm_source=baidu&utm_medium=cpc&utm_campaign=cn-bai-br-pycharm-ex-pc&utm_content=pycharm-pure&utm_term=pycharm )

After the download is complete the next step in the end the same way, so far, Python development environment to build complete.

Hello World

Must write a complete environment to build Hello World, this belief is not just programmers, but also the respect of a development language

With reverence Pycharm double-click the icon, a box will pop up to let us choose the path code to be placed, and this depends on personal habits, just put a place, we must remember the path, or can not find the next open opportunity .

Then open the following small arrow, this is to select the compiler, we have just installed, and directly select an existing compiler.

Click on the only button Create, wait a minute, life in the first Python project has been created.

Create a Python executable file name is called HelloWorld on ok.

Now start writing code

print('Hello World')

After written right click and choose run or debug all right

The console can be seen PyCharm normal print Hello World

Congratulations, first Python program has already been closed.

Sample Code

This series of small series all the code will be placed on code management repository Github and Gitee, to facilitate access.

Sample Code -Github

Sample Code -Gitee

Guess you like

Origin www.cnblogs.com/babycomeon/p/11696324.html