Old Boys preview notes

1.python birth

Python founder of Guido van Rossum (Guido van Rossum). During Christmas 1989, Guido van Rossum (Chinese name: turtle t) in Amsterdam in order to pass the time, determined to develop a new script interpreter, as a succession of ABC language.

2.python what language editor

Programming language mainly from the following angles are classified, compiled and interpreted, static and dynamic languages,

Strongly typed and weakly typed language definition language, we mainly divided by compiled and interpretive programming language Python is what

3. Edit the type and interpreted

The compiler is the source of each statement are compiled into machine language, and save it as a binary file, so running

The computer can directly in machine language to run this program, very fast;

The interpreter is only in the implementation of the program, only a one interpretation into machine language to perform to the computer,

So speed is not as good as the program compiled to run fast.

Why have compiled good interpreted language because the computer can not directly recognize and enforce our written statement, it can only recognize machine language (binary form)

python species

  • Cpython

  The official version of Python, using the C language, the most widely used, CPython will realize the source file (py file)

Is converted into byte code file (the pyc files), then run on a virtual machine Python.

  • Jyhton

  Java implementation of Python, Jython Python code will be dynamically compiled into Java byte code, and then runs on the JVM.

  • IronPython

     Python C # implementation, the IronPython C # Python code into byte code, and then run on the CLR. (Jython and similar)

  • PyPy (Special)

  Implemented in Python Python, Python bytecode will compile the bytecode into machine code.

1.3 Use

Chapter 2 Getting Started

2.1 Output

1. First create a text using Notepad ++ on Windows systems

Enter the print ( "hello world")

2.2 Variable

1 What is variable

Variable is the result of running the intermediate temporary stored in memory for subsequent use Code

This knowledge is used in which it? Variables are often used in the program

How variables?

print(12+34)

painted () (12 + 34) * 2)

a=12+34

b=a*2

Rules of variables

1. Variables are letters, numbers, underscores

2. Prohibition beginning digitally

3. prohibit the use of relevant keywords python

4. You can not use Pinyin and Chinese

5 Variables are case sensitive

6. recommended wording

Law named hump large peak Komine

Underline nomenclature.

Guess you like

Origin www.cnblogs.com/gongmingyang/p/11116774.html