Home  >  Article  >  Backend Development  >  How to use python after downloading it

How to use python after downloading it

藏色散人
藏色散人Original
2019-07-01 11:14:4329693browse

How to use python after downloading it

How to use python after downloading it?

Simple method of using python after downloading:

1. In win10 system, just click the search input idle in the lower left corner to see the application, click Open

How to use python after downloading it

The first method to enable python

If you see three greater than signs appearing and a cursor flashing behind them, it means the startup is successful

How to use python after downloading it

Confirm that the activation is successful

The first program is to print print. Enter print("hello") behind the cursor to print hello on the next line

How to use python after downloading it

Write the first program

How to define and use variables

How to use python after downloading it

Define variables

The key combination alt p can return the last executed command, and alt n returns the next command of the sentence.

Simple judgment whether two values ​​​​are the same

How to use python after downloading it

Judgment 1

How to use python after downloading it

Judgment 2

2.win R open and run

How to use python after downloading it

Enable python The second method

Enter python in the black window that opens After pressing Enter, you will still see the above operation interface, just operate it directly

How to use python after downloading it

Run python in cmd

Press ctrl z in the cmd black window You can exit python. Under Linux system, press ctrl D to exit python

In addition to writing the program according to the first method, you can also create a new blank page and save it in .py format. You can use notepad or sublime. text, the text document that comes with Windows can also be used, just don’t make a mistake in the final saving format. Here I use IDLE, select the first file in the upper left corner and there is a new file,

How to use python after downloading it

New file

After creating it, you can write normally Program

How to use python after downloading it

Related recommendations: "Python Tutorial"

The above is the detailed content of How to use python after downloading it. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn