Python:1-2、编写第一个python程序
2017-10-18 本文已影响4人
CnPeng
有两种编写方式,一种是直接在终端中编写,一种是在编辑器中编写,具体如下:
一、在终端中编写
打开“超级终端”

输入python3 ,输入python3表示用的python这门编程语言的第3个版本,如果只输入python的话表示用的是python的第2个版本

输入以下代码
print('hello world')

二、在编辑器中编写
打开编辑软件sublime

把以下代码,编写如下代码

保存代码

运行程序

