Practical application operations for Python Installation

Source: Internet
Author: User

If you have some problems with Python installation during the actual application process of Python installation, you can browse our article, our article is an introduction to its related content. I hope you will gain some benefits after reading our article.

Download the windows version. After the download is complete, double-click it and install it step by step.

 
 
  1. *Python 2.5.2 Windows installer 

After installation, start Python command line and enter:

 
 
  1. *Python 2.5.2 Windows installer  

If the output

 
 
  1. "Hello World" 

It indicates that the installation is successful. Simple configuration: Right-click my computer-properties-advanced-environment variables and enter your python installation location in path, which is much simpler than java. My E: \ python25133 should be the parent level directory of pythonw.exe. Test: Create a folder. For example, create a text file under d \ code \ python and change it to hello. py. Enter

 
 
  1. print "Hello World" 

Enter python hello in the installation path d \ code \ python at the command prompt. py, enter hello. py must set the environment variable.) The program will output Hello World. Let's look at another slightly complicated program.

 
 
  1. integer1=raw_input("enter the first integer:\n")  
  2. intinteger1=int(integer1)  
  3. integer2=raw_input("enter the second integer:\n")  
  4. intinteger2=int(integer2)  
  5. sum=integer1+integer2  
  6. print "The sum is ",sum 

Save as sum. py. The execution result is:

 
 
  1. E:\>python e:\python\sum.py  
  2. enter the first integer:  
  3. 8  
  4. enter the second integer:  
  5. 11  
  6. The sum is 19 

The above article introduces the Actual Application Operation solution installed in Python.

Related Article

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.