GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Python/Article/PythonBasis/python1/The_first_procedure.md at master · feijilee/Python

Expand file tree

/

The_first_procedure.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
28 lines (12 loc) · 1.25 KB
/

The_first_procedure.md

Copy path

File metadata and controls

28 lines (12 loc) · 1.25 KB
Raw
Copy raw file
Download raw file
Edit and raw actions

三、第一个 Python 程序

好了,说了那么多,现在我们可以来写一下第一个 Python 程序了。

一开始写 Python 程序,个人不太建议用专门的工具来写,不方便熟悉语法,所以这里我先用 Sublime Text 来写,后期可以改为用 PyCharm 。

第一个 Python 程序当然是打印 Hello Python 啦。

如果你没编程经验,什么都不懂,没关系,第一个 Python 程序,只要跟着做,留下个印象,尝试一下就好。

新建一个文件,命名为 HelloPython.py , 注意,这里是以 .py 为后缀的文件。

然后打开文件,输入 print('Hello Python')

最后就可以打开命令行窗口,把当前目录切换到 HelloPython.py 所在目录,就可以运行这个程序了,下面就是运行的结果。

当然,如果你是使用 Sublime Text ,并且在安装 Python 的时候配置好了环境变量,直接按 Ctrl + B 就可以运行了,运行结果如下:

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.