How to install and configure Python

Source: Internet
Author: User

If you have a detailed step on Python installation and configuration, you can browse our article. Our article is about Python installation and configuration, I hope you have read the following articles, and I hope you will have some gains. The following is a detailed introduction to this article.

Install it first, and then install it step by step. After installation, start Python command line and input: print "Hello World". If "Hello World" is output, the installation is successful.

The following is a simple configuration:

Right-click my computer-properties-advanced-environment variables and enter your python installation location in path. Isn't it easy? It's much simpler than java. In d \ code \ python, you can create it as needed .) Create a text file and change it to hello. py

 
 
  1. print "Hello World" 

Enter the path d \ code \ python at the command prompt and enter python hello. py, enter hello. py must set environment variables.) The program will output Hello World, which cannot be seen. Let's look at another one:

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

Save as sum. pyraw_input is a built-in function that requires user input. Integer1 = int (integer1) converts integer1 to an integer. Is python programming quite in line with human thinking ?? Enter the python programming world. The execution result is:

 
 
  1. Microsoft Windows [version 5.2.3790]

(C) Copyright 1985-2003 Microsoft Corp.

 
 
  1. d:\code\Python>sum.py  
  2. enter first integer:  
  3. 3  
  4. enter first integer:  
  5. 4  
  6. sun is 7  
  7. d:\code\Python> 

The above article introduces the practical application solutions for installing and configuring 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.