Introduction and Getting Started with Python

Source: Internet
Author: User

Introduction and Getting Started with Python

· Python is a scripting language that combines interpretation, sexual compilation, interactivity, and multiple object-oriented features. For beginners in programming,Python is easy to read and learn, and supports a wide range of application development with a broad base database that supports multiple platforms.

· Install Python in the In the Windows environment

1. go to Python 's official website:https://www.python.org/

2. Click downloads==> Downloads for windows==> Python 3.6.2

3. download the installation file and tick 'Add python 3.6 to path '. ' and select the installation directory to install .

· The first sentence of Python:

Create a new text document on the desktop, change the file suffix name to. PY and Create a new Python file.

Right-click Python files can be edited by selecting ' Edit with IDLE 3.6 '.

Press The current code can be F5 by a test run. The results of the operation are as follows:

· Notes

There are two types of comments in Python: single-line comment ==> at the beginning of the line and # Multiline Comment ==> in the comment content "

· Variables

Naming rules for variables:

1. A variable can only be a combination of letters, numbers, and underscores

2. The first character of a variable cannot be a number, only a letter or an underscore.

3. Keywords cannot be named as variables:

[' and ', ' as ', ' assert ', ' Break ', ' class ', ' Continue ', ' Def ', ' del ', ' elif ', ' Else ', ' except ', ' exec ', ' finally ', ' for ', ' F ' Rom ', ' Global ', ' if ', ' import ', ' in ', ' was ', ' lambda ', ' not ', ' or ', ' pass ', ' print ', ' raise ', ' return ', ' try ', ' while ', ' WI Th ', ' yield ']

• Enter a variable assigned to the user's input

in the In Python 3.0, theinput function defaults to str, and you need to use the INT function if you need to enter a number type character .

Introduction and Getting Started with 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.