03.hello world!

安装好python3后,从'hello world!'开始吧。

1.在windows命令行或者linux终端中输入:python3打开交互模式(蓝色字体是我们要输入的内容)

C:\Users\***>python3
Python 3.7.2

***
Type "help", "copyright", "credits" or "license" for more information.
>>>

2.在提示符后方输入print('hello world!') 按回车(蓝色字体是我们要输入的内容)

C:\Users\***>python3
Python 3.7.2

***
Type "help", "copyright", "credits" or "license" for more information.
>>>print('hello world!')  # print() 里的内容是我们要输出到屏幕上的内容, 用一对单引号(' ')或一对双引号(" ")包含起来;

3.输出结果(蓝色字体是输出内容)

C:\Users\***>python
***
Type "help", "copyright", "credits" or "license" for more information.
>>> print('hello world!')
hello world!
>>>

4.Python IDE(集成开发环境)

上面的交互模式只适合简单的语句,还是挑一款趁手的兵器吧;

我用PyCharm,有代码补全,有关键字变色,喜欢!

 

posted @ 2020-03-28 10:53  阿林1025  阅读(69)  评论(0)    收藏  举报