一、检查Python版本
Danny以Windows为例来讲,打开cmd在配置好环境变量的情况下,输入:
C:\Users>python
返回的结果为:
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:01:18) [MSC v.1900 32 bit (Intel)]
on win32
Type "help", "copyright", "credits" or "license" for more information.
二、编写第一个程序
来教大家写一个"Hello World!"
>>>print("Helloword!")
2.打开记事本写下print("Helloword!")之后,保存为helloworld.py
在helloworld.py当前目录打开cmd输入python
>>>python helloworld.py
然后两种方法最终的结果都是在控制台输出:
Helloworld!

我的微信
有问题微信找我