Python - the first python program helloworld

After installing the Python environment, it is time to write Python code.

First, let's write a simple "hello world"

Create a new blank txt text and change the suffix to .py

After changing the suffix, it becomes the icon of the Python program

 

Then, right-click the icon to use Python's own editor IDLE to write code

 

Then enter the code:

print('hello world!')

 

 Finally run the code:

Select Run > Run Module, or press the shortcut key F5 to run the code.

 

 The result is as follows:

 

The first hello world program is complete.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325012541&siteId=291194637