暂无商品咨询信息 [发表商品咨询]
本书为全国电力行业“十四五”规划教材。
本书由浅入深地介绍了Python语言相关的基本知识、数据结构和基础语法。
本书凝聚了作者多年来的教学经验和对Python语言的深刻理解。我们秉持“学以致用”的原则,将理论知识与实际应用紧密结合,每章内容设计围绕着培养程序设计能力这一核心展开,重点讲解Python的基础知识、算法概念和程序结构,帮助学生建立起坚实的知识框架。通过一系列精心设计的案例和问题导向的学习活动,激发学生的探索精神和创新意识,使他们在实践中不断进步。全书共分为12章,具体包括计算机基础知识、初识Python、Python语言基础、选择结构、循环结构、列表和元组、字典和集合、字符串、函数、面向对象程序设计、模块、异常处理及程序调试、文件与目录操作等内容。
Catalogs
Foreword
Chapter 1 Overview of Python 1
1.1 Python overview 1
1.2 Development environment3
1.3 Summary of this chapter 5
Chapter 2 Python language basics7
2.1 Python program composition7
2.2 Packages, modules, and functions8
2.3 Identifier and its naming rules 11
2.4 Common data types13
2.5 Operators and expressions 18
2.6 Objects and references 23
2.7 Inputs and outputs27
2.8 Summary of this chapter 31
Chapter 3 Branch structure 33
3.1 Flow charts and three structures33
3.2 Operators and precedence 37
3.3 Branch structure (single, double, multi-branch and nested)41
3.4 Summary of this chapter 47
Chapter 4 Loop structure49
4.1 The while loop and the sentinel loop 49
4.2 For statements and nested loops52
4.3 Iterable objects 56
4.4 Built-in function range56
4.5 The break statement, continue statement and else clause 58
4.6 Getting started with data science 63
4.7 Summary of this chapter 64
Chapter 5 Lists and Tuples66
5.1 Sequences66
5.2 Lists67
5.3 Tuples86
5.4 Unpacking and packing89
5.5 Summary of this chapter 91
Chapter 6 Dictionaries and Collections92
6.1 Dictionaries 926.2 Assemblies 99
6.3 Summary of this chapter 103
Chapter 7 String 104
7.1 Definition of the string 104
7.2 Escape characters and original strings 104
7.3 String formatting 105
7.4 Common operations on strings 108
7.5 Regular expressions112
7.6 Summary of this chapter116
Chapter 8 Functions 117
8.1 Define and call the function117
8.2 Passing arguments 119
8.3 Variable scopes 122
8.4 Recursive functions 124
8.5 Built-in functions and the Python standard library 126
8.6 Summary of this chapter 129
Chapter 9 Modules 131
9.1 Module Overview 131
9.2 Importing modules 132
9.3 Packages in Python 134
9.4 Referencing other modules 135
9.5 Summary of this chapter 138
Chapter 10 Object-Oriented Programming 139
10.1 Overview of object-oriented programming 139
10.2 Class definition and instantiation 141
10.3 Attributes and methods 143
10.4 Inheritance 150
10.5 Summary of this chapter 154
Chapter 11 Exception Handling and Program Debugging 155
11.1 Overview of Exceptions 155
11.2 Exception handling statements 156
11.3 Program debugging 159
11.4 Summary of this chapter 162
Chapter 12 File and Directory Operations 163
12.1 Definition of file 163
12.2 Directory Operations 164
12.3 File Op
基本信息 | |
---|---|
出版社 | 中国电力出版社 |
ISBN | 9787519899479 |
条码 | 9787519899479 |
编者 | 周景 主编 李廷顺 周蓉 副主编 著 |
译者 | -- |
出版年月 | 2025-05-01 00:00:00.0 |
开本 | 16开 |
装帧 | 平装 |
页数 | 180 |
字数 | 277000 |
版次 | 1 |
印次 | 1 |
纸张 |
暂无商品评论信息 [发表商品评论]
暂无商品咨询信息 [发表商品咨询]