Congratulations! You've taken your first steps in Python, and you're well on your way to reading and writing much more sophisticated Python programs. In this module, we saw how to download and install Python on Windows, Linux and macOS. We covered starting your Python REPL. We evaluated some simple expressions in the REPL. We learned that in the REPL, the underscore symbol is bound to the result of the last evaluated expression. We saw how to make basic use of the print function, and we learned that the printed output is a side effect of the function, not a return value. We saw how to exit the REPL using Ctrl+Z on Windows and Ctrl+D on Linux and macOS. We were introduced to Python's use of significant whitespace. We learned that code blocks in python are initiated with a colon and comprise consecutive lines at the same indentation level. We looked at some of the advantages of significant whitespace, including clarity and consistency. We covered the basic rules for indentation in Python. On a less technical level, we covered some parts of Python's culture. We looked at the Zen of Python and saw that it could be printed by executing import this in the REPL, and we looked specifically at the idea that readability counts when writing Python code. We covered the basics of importing modules from the standard library, and we saw three forms of the import statement, importing an entire module, importing selected elements of a module, and renaming imported elements. We saw how to use Python's help system. Along the way, we saw how to use the factorial function from Python's standard math library. In the next module of Core Python: Getting Started, we'll look at Python's fundamental scalar types, integers, floats, nones, and bools, as well as some basic flow control constructs.
相关文章
- 11-02.net core https 双向验证
- 11-02Matlab_Graphics(1)_2D
- 11-02.NET CORE部署各种问题
- 11-02Ionic2实战——按模块划分app 创建多module
- 11-02python协程的使用
- 11-022018-2019-2 20165320 《网络对抗技术》 Exp7:网络欺诈防范
- 11-021.(1)编写一个接口ShapePara,要求: 接口中的方法: int getArea():获得图形的面积。int getCircumference():获得图形的周长 (2)编写一个圆类Circle,要求:圆类Circle实现接口ShapePara。 该类包含有成员变量: radius:public 修饰的double类型radius,表示圆的半径。 x:private修饰的double型变量
- 11-022018-2019-2 网络对抗技术 20165323 Exp7 网络欺诈防范
- 11-02[leetcode] Reverse Linked List 分类: leetcode 算法 2015-07-09 18:44 2人阅读 评论(0) 收藏
- 11-02python提取一段文字的关键词