从廖雪峰老师的网站开始了python自学之路,第一天记录如下:
1.安装python3.5 download地址https://www.python.org/downloads/windows/
安装后打开命令提示符,显示版本如下,即为正常。

2.命令提示符进入>>>即为进入交互模式,交互模式下输入print(‘hello,world’)完成python的第一步

3.退出交互模式:exit()

4.不过交互模式下程序是保存不下来的,要想把程序保存下来,就需要保存为.py的文件,比如我们将hello,world作为第一个程序,保存为1st.py,文件地址为E:work,在命令模式下输入文件名,就可以得到程序结果了。

命令模式下输出结果需要使用print
网友评论