1、使用python的解释器运行:打开交互式解释器,写入“print‘hello world’”。
2、将文件名改为“hello.py”,“py”是后缀名。
3、打开刚才写的代码,点击“Run”→“run module”,或者直接按“F5”,运行代码。
4、通过Windows命令运行:找到“hello.py”的文件,输入“python hello.py”,即可运行程序。
5、总结如下。
1、使用python的解释器运行:打开交互式解释器,写入“print‘hello world’”。
2、将文件名改为“hello.py”,“py”是后缀名。
3、打开刚才写的代码,点击“Run”→“run module”,或者直接按“F5”,运行代码。
4、通过Windows命令运行:找到“hello.py”的文件,输入“python hello.py”,即可运行程序。
5、总结如下。