1. The basic structure of a computer
Five 1) is composed of a computer: CPU, memory, hard drive, an output device, an input device
2) Operating System: windows, Mac, Linux
3) computer programming language Category: machine language, assembly language, high-level languages, compiled languages, interpreted languages
2.Python entry
1.1) prepared python code in two ways:
- interactive environment (temporarily effective, closed invalid)
--python file (permanently save python code, all the files are py python file)
2) things run python code generated
- First execution python interpreter, load python interpreter
- python file to load into memory
- execute python code
3) variables: the amount is variable, the equivalent of human memory
Note: The first definition, after calling
- variable names: the relationship between the variables bound value, equivalent to the value of a variable number of the house
- =: used to bind variable name and variable value
- variable values: generating in memory, the effective power, power loss
4) python8 large data type
- Integer (integer): int
Used to store identity, age ...
- Float (decimal): float
Storage salary, height
- string: str
Must be caused by a single or double quotes, triple quotes
- Boolean
True False
- list within brackets [] can be stored a plurality of variables, each variable can be separated by commas
Note: The comma must be in English input method
Value: The name of the standard list
- Ganso
Parentheses () can be stored within a plurality of values, each value may be a comma
Note: The list can be modified value, not a tuple
-set
{1,2,3, ...} may store multiple values, to re-built function
-dictionary
Braces {} may store a plurality of values, each value in a key: value stored in the form
Note: The dictionary key must be unique
{key:value,key2:value}