Basics of office politics.
- cpu quite the brain responsible for computation and problem solving fastest
- Temporary memory to store data fast charge
- Data storage hard charge cloud long slow
- The operating system provides a bridge to the computer all independent infrastructure so that they can establish links with each other
python applications and history
python2 Version: source code is not uniform, repeat function `difficult maintenance
python3 Version: Code to reduce the difficulty of maintaining unity
What is a python programming language
Category: compiled, interpreted.
Compiled; translated only once
Advantages: run fast
Disadvantages: slow development
Representatives: c, c ++
Interpreted: Progressive Translation
Pros: Fast Development
Cons: Slow speed
Representatives Language: python
Mixed: java
python advantages and disadvantages
- easy to understand
- Development of high efficiency
- High-level language
- portability
python species
python simple to install and configure the environment
- Free set at the beginning of exe
Write a python program
- ptini ()
variable
A simple variable names instead of variable `
- Decline line consisting only of alphanumeric
- You can not begin with a number
- You can not use the keyword
- It is not intended to build and use Chinese pinyin
- Case sensitive
- Variable names to be meaningful
- Recommended wording:
- Hump body: capitalize the first letter
- Decline line: official recommendation _
Steady
- Variable names in all caps as a constant
Note
- Some do not understand the code for a functional description Remarks - makes it easier to understand
- When the line (one-way) Note: # comment line only, can not wrap
- Multi-line comments: Support Wrap
- Notes content in the program does not run
- But will not use the annotation content into a string
The basis of the type of acquaintance
int numbers - Plastic
- str string is quoted
User input input
- input (), in parentheses prompt
- python3 version obtained content are strings
- type View type
Flow control statements if five options
Simply choose
if conditions:
One of many
if conditions:
Result
elif condition:
Result
elif condition:
Result
Multiple choice is not limited to:
if conditions:
Result
if conditions:
Result
if conditions:
Result