One, the history of Python
"Uncle Turtle" uses the C language, the use of a holiday written in high-level language.
Language divided into: compiled interpretation type
C Python
Two, the Python version
PYTHON2X and python3x
Manufacturers will update to 2020 continuous update (the following source code is basically the PYTHON3X interpreter mainly)
Three, easy-to-use IDE tools
Pycharm, supports Windows Authoring and Linux Environment Authoring (vi).
Knowledge Points:
Four, variables and constants
1, variable is any combination of digital letter underline
2. The variable cannot be the beginning of a number
3. The variable cannot be a keyword in python
4. Variables to be descriptive
5. Variables cannot be used in Chinese
6. Variable cannot be too long
Constants are constant quantities, such as π;
And there are no constants in Python.
Five, initial code
PYTHON2X python3x
Asiic yards UTF-8
ASIIC Code: 8 bits = 1 bytes, representing one character
Universal code: Unicode contains the language of all countries
Unicode Upgrade: utf-8: A minimum of 8 bits for one byte
A: 1,000,111 bytes
European script: two bytes
Asia: Medium: three bytes
Utf-16 at least 16 bits for one character
GBK: GB.
A 1,010,101 bytes
Medium: 01010001 10,100,112 bytes represent one character
Conversion of units:
8bit = 1bytes
1024bytes=1kb
1024kb=1mb
1024mb=1gb
1024gb=1tb
VI, user interaction
Input
PYTHON2X python3x
Raw_input (str) input (str)
Input (int)
Seven, if loop
If condition:
Results
Eight, while loop
While .... : #满足该条件
。。。。。 Perform
。。。。。 Perform
Jump back while
The path of Python development (i)