龙空技术网

python程序设计基础(十三)

LearningYard学苑 255

前言:

此时我们对“python教程chapter”大概比较关切,看官们都想要知道一些“python教程chapter”的相关内容。那么小编也在网上搜集了一些有关“python教程chapter””的相关内容,希望兄弟们能喜欢,看官们一起来了解一下吧!

python程序设计基础(十三)

小编最近在准备python程序设计基础的期末考试,需要总结所学内容的知识点,所以这几次便分享我复习的内容和知识体系。

首先是第一章,python语言概述。在这一章主要掌握两大部分的知识点。

1. 了解python语言整体概念。Python是一门跨平台、开源、免费的解释型高级动态编程语言。是一种胶水语言融合不同语言编写的程序。Python支持命令式编程(How to do)、函数式编程(What to do),完全支持面向对象程序设计,拥有大量扩展库。

2. Python编程规范与代码优化建议。规范体现在代码块对缩进的严格要求。代码优化建议包括模块导入建议、空行的添加、语句的长度、注释、优先级、运行速度。导入模块的建议,其本质也是加快运行速度,导入顺序为Python内置对象, Python标准库,第三方扩展库。

3. 其中有一个考点--为导入模块的几种方式。如导入math标准库,其方法有import math,from math import sin,from math import *。这三种方法中第二种速度略快,并且可以根据具体情况将sin as 为所需要的名称。

4. 实例,用三种方法求sin(3).

英文翻译

The editor is currently preparing for the final exam of the basics of python programming. I need to summarize the knowledge points of the content I have learned, so I will share the content and knowledge system of my review these few times.

First is the first chapter, an overview of the python language. In this chapter, two major knowledge points are mainly mastered.

1. Understand the overall concept of python language. Python is a cross-platform, open source, free, interpreted high-level dynamic programming language. It is a glue language fusion program written in different languages. Python supports imperative programming (How to do), functional programming (What to do), fully supports object-oriented programming, and has a large number of extended libraries.

2. Python programming specifications and code optimization suggestions. The specification is embodied in the strict requirements for indentation of the code block. Code optimization suggestions include module import suggestions, blank lines addition, statement length, comments, priority, and running speed. The essence of the suggestion for importing modules is to speed up the running speed. The import order is Python built-in objects, Python standard libraries, and third-party extension libraries.

3. One of the test sites is several ways to import modules. For example, to import the math standard library, the methods include import math, from math import sin, and from math import *. The second of these three methods is slightly faster, and sin as can be the desired name according to the specific situation.

4. For example, three methods are used to find sin (3).

参考资料:《python程序设计基础》董付国

翻译:Google翻译

本文由LearningYard新学苑原创,部分图片文字来自网络,如有侵权请联系。

标签: #python教程chapter