First knowledge of Python

Source: Internet
Author: User

One: The classification of programming languages

(1) Machine language

Machine language is a set of machine instructions that can be directly identified and executed by a computer using binary code.

(2) Assembly language

Assembly language uses abbreviations, identifiers are easier to identify and remember, and it also requires programmers to write each step of the action in the form of a command.

(3) Advanced language

is programmed with characters that humans can read.

II: Python's application areas

Reptile-Reptile field, Python is almost the supremacy, Scrapy\request\beautifusoap\urllib, and so on, want to climb what to climb what

Cloud computing-the most popular cloud computing framework today is Openstack,python's fire, and a big part of it is cloud computing-the most popular cloud-computing framework of the Openstack,python is now a fire, much of it because of cloud computing

Network programming-support for high-concurrency Twisted Network framework, PY3 introduced Asyncio makes asynchronous programming very simple

Scientific computing--you know, since 97, NASA has been using Python for a variety of complex scientific operations, with the development of NumPy, SciPy, Matplotlib, Enthought Librarys and many other libraries, Python is becoming more and more suitable for scientific calculations and for drawing high-quality 2D and 3D images. Compared with the most popular business software matlab in the field of scientific computing, Python is a universal programming language that is more widely used than the scripting language used by MATLAB.

Automated operations-ask each operator in China what language is required for operations personnel? 10 people believe will give you the same answer, its name is Python

Three: The first line of Python code

(1) Interpreter: Instant debug code, cannot be saved permanently

(2) File: Permanently save code

Four: identifier command specification

Variable names can only be any combination of letters, numbers, underscores

A keyword in Python cannot be used as a variable name

The first letter of a variable name cannot be a number

V: Circular Statements

1.while Loop:

Loop body

The condition is true and the loop body is executed

The condition is false and the loop body is not executed

2.break

Suitable for exiting this layer loop

3.continue

Applies to exiting the loop and continuing with the next loop

4.for Cycle

  

 for  in range (1,10):    as in range (1,10):        = i * j           Print('%s*%s=%s'% (j,i,prod),'")     Print (')
View Code

First knowledge of Python

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.