01-python- full stack three -day9-python development of courses Summary
- Linux Basics
Simple operation as well as computer servers in the future development of our program placement, non-essential not does not matter.
Operation and maintenance engineers (eg: Linux server built on top of a variety of software services and maintenance software ......)
Network Engineer (example: when the cause of poor network conditions preclude ......)
Software Development Engineer (example: Application Development Software) (learning objectives)
- Python development
- Python basis
--basis
- the basic data types
--function
- Object-Oriented
- Network Programming (sending and receiving messages over the network)
- Web framework (for writing Web site)
- + Algorithm design pattern (design is very important to take a long time to design, pay attention to develop their own design capability)
- Project phases (of the previous project practice what they learn)
02-python- full stack three -day9-python operational requirements and blog
Python basis
--basis
- the basic data types
--function
- Object-Oriented
Learning Python Reference blog: http://www.cnblogs.com/wupeiqi/articles/5433893.html
operation:
--program
- blog (the day talking about the content of the discussion according to their own understanding to the blog above, has the purpose of thinking finishing)
Process: Registration application ------ ---------- login my blog
Essay: Everyone in the blog which can be found in
Article: only you can see that others can not see, but you can tell people what the article URL
Log: only you can see, there are other people can not see URL
03-python- full stack three -day9-python programming language Introduction
Development:
Development language:
Low efficiency, high development efficiency bytecode <- level languages: Python, Java, PHP, C #, Go, Ruby ...
High efficiency, low development efficiency machine code <- low-level languages: C, assembly language
The contrast between the language:
PHP classes: for writing web pages, has limitations
Python, Java classes: either write on the page, they can write back-office functions
Python: low efficiency; the development of high efficiency
Java: high efficiency; low development efficiency
The kind of 04-python- full stack of three -day9-python
1.Cpython
official version of Python, using the C language, the most widely used, CPython will realize the source file (py file) into byte code file (pyc files), then run on Python virtual machine. (Python write content to the python interpreter, python interpreter to help us to perform)
2.Jyhton
Python Java implementation, Jython Python code will be dynamically compiled into Java byte code, and then runs on the JVM. (Python write content to the Java interpreter, Java interpreter to help us to perform)
3.IronPython
Python C # implementation, the IronPython C # Python code into byte code, and then run on the CLR. (Jython and similar)
4.PyPy (special)
Python implemented Python, the Python compile byte code into machine code. In Python to Python bytecode further processing on the basis, so as to enhance execution speed! PyPy is the fastest speed faster than Cpython, but because of his stability, he is not yet mainstream. (Why fast)
05-python- full stack three -day9-python installation and operation environment variables (a)
Python software called the Python interpreter (memory management, garbage collection)
Python3: continue to update (the great span of python3 and Python2)
Python2: continue to update such python2 closer to python3
Python2 recommendations are installed and Python3
After the successful installation of Python, to configure the environment variable, easy to open in any directory
06-python- full stack three -day9-python installation and operation environment variables (b)
Python2 installation and configuration environment variable and Python
07-python- full stack three -day9-python acquaintance and variable (a)
- The first sentence Python
- extension is arbitrary
- When the project is relatively large, when you import the module, if not the name suffix .py file, then import to be wrong
-> After all recommended naming suffix .py
2. python performed in two ways (and interpreter terminal)
Python interpreter file path
Python in DOS input window enter the Python interpreter, and get real-time input to execution results
- Note: If you write a program which has Chinese, python2 will complain, python3 does not complain.
Because the inside Python2 default encoding is ASCII code, does not recognize Chinese, then the program may be added
# - * - coding: utf-8 - * - statement also identifies that the Chinese interpreter;
The default python3 which is utf-8, Chinese itself can be identified.
So Python3 inside without paying attention in English, Chinese and Python2 involved, must join utf-8 statement on the head
ASCII code is 8, so the number of characters represented is limited, it can not be represented Chinese, hence the Unicode
Unicode is at least 16, all the characters can be represented, but there will be a big waste problem (three can represent a character, but also with at least 16), and later appeared utf-8, expressed on demand the number of bits required. Three can represent a character, use of three.
- (Role under Linux) interpreter path: #! / Usr / bin / env python
- Python interpreter from top to bottom of a sentence interpretation
07-python- full stack three -day9-python acquaintance and variable (b)
- Variable names can be any combination of letters, numbers or underscore
a. The first character variable names can not be digital
b. is best not to repeat things and built-in Python (sum Python is built, after the variable names do not sum)
c. The following keywords can not be declared variable name
[ 'and', 'as' , 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else' , 'except', 'exec' , 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is',' lambda ',' not ',' or ',' pass', ' print', 'raise', 'return', 'try', 'while', 'with', 'yield']
2. When the line comments: # annotated content multi-line comments: "", "content is annotated" ""
08-python- full stack three -day9-python conditional statements and basic data types (a)
- Conditional statement (Python inside conditional statements must pay attention to the front block has retracted, generally the front four-frame space)
A TAB key in pycharm which is to represent the four spaces
if conditional statement:
Block
else:
Block
Example 1: If a is equal to 1, then the output of the first Welcome clubs, or the output of a channel Welcome
if 1==1:
print ( 'Welcome to the first Club')
else:
print ( 'Welcome to a track')
Example 2: if --- else can be nested (Note that the order of execution)
if 1==1:
if 2==2:
print ( 'Welcome to the club first 1')
print ( 'Welcome to a first club 2')
else :
print ( 'Welcome to the Tokyo special')
else:
print ( 'Welcome to a track')
……
Example 3: Multi-conditions if --- else
inp = input ( 'Please enter your membership level:')
if inp == "senior member":
print ( 'beauty')
elif inp == "Platinum Membership":
print ( 'Damo')
elif inp == "Platinum Membership":
print ( 'first-line starlets')
else:
print ( 'urban')