Home  >  Article  >  Backend Development  >  How to run python program

How to run python program

silencement
silencementOriginal
2019-05-16 13:21:129772browse

Through the previous study, we now have mastered the basic knowledge of Python, and we can also write some simple codes ourselves. So how do you run the code you wrote?

How to run python program

Today we’ll talk about how to use Python’s built-in idle to run our code

The use of IDLE has been discussed in previous tutorials and will not be repeated here. Repeat. Go straight to the topic

IDLE Create a new Python file. After opening IDLE, click File in the upper left corner, and then click the first item NewFile to create a python file. Or directly use the shortcut key, Ctrl N, to create quickly.

How to run python program

Write Python code in the created file

How to run python program

How to run python program

Save the file, Directly use the shortcut key, Ctrl S, The format of the file name must end with .py

How to run python program

Run the saved Python file (program) directly Run Python programs in IDLE. Click Run at the top of the window, then click RunModule to run the program. You can also use the shortcut key F5 to run quickly.

How to run python program

Let’s practice it!

The above is the detailed content of How to run python program. 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