The first Python program

Source: Internet
Author: User

After the program is installed, you can enter the Python programming Tour, this lesson we will write some code, let you get a preliminary understanding of Python programming.

First we open the Python program from the command line:

Python

If the following information appears, you have successfully run Python and entered its interactive mode:

Python 2.6.6 (r266:84292, Jul, 15:22:56 4.4.7 20120313 (Red Hat 4.4.7-11" Help " " Copyright " " credits " or " License "  for More information.

Now, you can write some code to do it. For example, we enter print (' Hello ') after >>>, and then enter:

Print ('hello') Hello

If you see the interpreter return Hello, congratulations, you have successfully executed your first line of code. Let's take a look at the meaning of this line of code, print () receives the ' Hello ' string and prints it out.

The first Python program

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.