Python第三章 Python的编写和运行

第三章 Python的编写和运行

Python运行有三种方式

  1. Python解释器环境内,执行单行代码
  2. 使用Python解释器程序,执行Python代码文件
  3. 使用第三方IDE(集成开发工具),如PyCharm软件,开发Python程序

【说明】前两种方式都是进行测试的,开发中使用第三种方法

接下来逐一演示


1、Python解释器环境内,只能执行单行代码

image-20230923195645596

2、使用Python解释器程序,执行Python代码文件

首先在编写Python文件,D:\test.py

然后执行

image-20230923195825030

print("hello,world")
print("hello,world2")

然后运行

image-20230923195912600

3、使用第三方IDE(集成开发工具),如PyCharm软件,开发Python程序

image-20230923200446922 image-20230923200534034
image-20230923200536448 image-20230923200602864

然后写程序

print("hello,world")
print("hello,world2")

运行

image-20230923200818455

posted @ 2023-10-07 11:33  Crispy·Candy  阅读(17)  评论(0编辑  收藏  举报