Python learning Note One: Python configuration and the first program

Source: Internet
Author: User

1. Download python, I have installed version 3.3

: Http://rj.baidu.com/soft/detail/17016.html?ald

2. Once the download is complete, you can install it directly. The installation process is omitted

3. After the installation is complete, the program startup item. Where idle is the IDE that comes with Python

4. Under Windows, after the installation is complete, you also need to configure the environment variables for Python to use and debug.

Next, take the WIN7 system as an example to configure the environment variable

(1) computer--right---Properties

 

(2) in the left column, find "Advanced system settings" and open, click "Environment variables"

(3) in the system variable, locate path, double-click. at the end of the string, add a semicolon, and then enter the path where you installed Python,

OK, OK, until Setup is complete.

(4) Open the command line, enter Python, and the following prompt is the configuration succeeds

5. Once the environment configuration is complete, the first Python program can be completed. First open the Idle program in the third section above.

Here we can use the format of Help () to query the appropriate assistance situation. For example, print. The first print program for many tutorials on the web now

The wording is print "Hello,world", I initially found this statement in 3.3 is wrong, so with help, query to

Statement in the correct format, under 3.3 My first program statement is: print (' hello,world! ') is actually the same as print ("Hello,world"),

But I used Delphi to use single quotes. Then enter, if the correct output information is displayed below, then the statement is correct.

6. Click File-save to save the program as a. PY program format. If you want to call the file directly, you can use the Python path \ name. py format under CMD, or enter the name. py format directly in the directory to execute the program. It's all possible.

Python learning Note One: Python configuration and the first 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.