Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the specific steps for Python installation and configuration

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

Python installation and configuration of how the specific steps, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.

Install it first, then install it step by step. Once installed, start Python command line and type: print "Hello World". If you output "Hello World", it indicates that the installation is successful.

Here is a simple configuration:

Right click on my computer-Properties-Advanced-Environment variable and enter your python installation location in path. Is it very simple? it's much simpler than java. In d\ code\ python (you can set it up there as you like. ) and rename it to hello.py and enter it in the text

Print "Hello World"

At the command prompt, go to the d\ code\ python path, enter python hello.py, and directly enter hello.py (you must set the environment variable). The program will output Hello World. This program doesn't see anything. Let's look at another one:

Integer1=raw_input ("enter first integer:\ n") intinteger1=int (integer1) integer2=raw_input ("enter first integer:\ n") intinteger2=int (integer2) sum=integer1+integer2 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 in line with human thinking? Enter the world of python programming quickly. The execution result is:

Microsoft Windows [version 5.2.3790]

(C) copyright 1985-2003 Microsoft Corp.

D:\ code\ Python > sum.py enter first integer: 3 enter first integer: 4 sun is 7 d:\ code\ Python > is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report