Yesterday basic computer class notes [] day01

Yesterday contents
1. Principles of Computer
2.python basis

- What is language?
Language is the medium of communication between people.
- What is the programming language?
Programming language is communication between man and computer media.
- Why learn programming?
Let machines instead of manpower, the service of humanity.

****: What is software (programs)
within the text of a bunch of files is a bunch of code.

- five components of computers
-CPU: + control operation (corresponding to Japanese human brain)
- the memory: a storage device for temporarily storing data. Powered data is present, power is lost.
- Hard disk (external memory): used to permanently store data, power is not lost.
- Input devices: keyboard, mouse ...
- output devices: monitors, audio ...


- Operating system :
-Windows:
Microsoft's operating system, generally used for office work, entertainment (movies, play games).

-Mac:
Apple's operating system, generally used for office, with pictures and video ...

-Liux:
for the operating system as the server-side.


- Programming language classes
- machine language :
refers to the machine directly can read text, binary form of expression.
01010101010101
010: Are you
010: U
10101011: handsome

advantages: high efficiency
Disadvantages: the development of efficient low

- assembly language:
instead of two made by some of the characters, in order to improve development efficiency.
a: 101010100

advantages:
high efficiency. (Low compared to machine language)
Disadvantages:
low efficiency of development

- high-level language :
closer to human language called high-level language.
A human can see the characters understand.

eg: python \ java \ C ...

advantages:
high development efficiency.

Disadvantages:
efficiency, lower than the machine assembly language.



- compiled language:
similar Xinhua Dictionary, the Oxford English Dictionary.

Advantages:
the implementation of high efficiency
Disadvantages:
development efficiency is low


- an interpreted language :
similar to simultaneous interpretation, while the implementation side translation.

Advantages: high development efficiency

disadvantages: low efficiency

Note : The computer can only recognize binary characters

Python: is an interpreted language.



Python:
1. write python code in two ways : -
Interactive environments:
temporary valid, invalid closed.

-python file (******)
permanently save python code, all files are python .py file.

Py file creation step; -> project folder right click -> New-> python file (write the name python file)

2. python code execution things will happen:
1) implementation of the python interpreter, loaded Python interpreter.
2) to load the python file into memory.
3) perform python code.


3. Variable
variables can change the amount, equivalent to human memory.
Note: The first definition, after the call.
- variable name: variable values and binding relationship, the equivalent of house number variable values.
- =: variable name and a variable value bind
- variable values: generated in flash memory, effective power, power is not valid.

4.python data type

type (variable name): used to view data types.
python8 Big Data type:
- integer (integer): int
18
for storing the card ID, age ...

- float (decimal): a float
15.5, 1.9
store pay Height

- the string
must be caused by a single or double quotes, three quotes

- Boolean
True: True, false: false

- list
brackets [], brackets can store a plurality of variables, each separated by commas.
Note: The comma must be in English input method.
Value: The name list [index]

- tuples
parentheses (), a plurality of values can be stored in parentheses, each of the values separated by commas
Note: The list can be modified value tuples not.

- set
{1,2,3, ...}
braces {} brackets separated by commas, can store multiple values.
Built-in automatic de-duplication function

- dictionary
braces {}, comma in parentheses, may store a plurality of values, but the values are in each key: value stored in the form.
Note: The dictionary key must be unique .
{key:value,key2:value}




Guess you like

Origin www.cnblogs.com/chendong1997/p/11580914.html