Python语言程序设计(英文版)
作者 : (美)Y. Daniel Liang 著 阿姆斯特朗亚特兰大州立大学
丛书名 : 经典原版书库
出版日期 : 2013-03-15
ISBN : 978-7-111-41234-2
定价 : 79.00元
教辅资源下载
扩展信息
语种 : 英文
页数 : 576
开本 : 16
原书名 : Python语言程序设计(英文版)
原出版社: Pearson Education Asia
属性分类: 教材
包含CD :
绝版 :
图书简介

本书作者具有丰富的程序设计课程教学经验,著有多本经典教材,本书是其全新编写的针对Python程序设计的教材。书中介绍了学习Python语言的最基本概念,如语句、循环、函数等,还通过一些典型的编程实例,帮助读者全面理解该语言的程序设计方法和技巧。

图书特色

本书保持了Liang博士系列丛书中一贯的、标志性的教与学的哲学:以实例教,由实践学。书中采用了他所提出的已经经过实践检验的“基础先行”的方法,即在定义类之前,首先使用清晰简明的语言介绍基本程序设计概念,如选择语句、循环和函数;在介绍面向对象程序设计和GUI编程之前,首先介绍基本逻辑和程序设计概念。书中除了给出一些以游戏和数学为主的典型实例外,还在每章的开始使用简单的图形给出一两个例子,以激发学生的学习兴趣。
本书特色
以“基础先行”方法介绍基本程序设计概念和方法,帮助学生循序渐进地学习所有必需和重要的基本概念。
以“问题驱动”方法讲授程序设计技术,强调问题求解,而非语法。通过广泛的趣味性实例(涉及数学、自然科学、商业、金融、游戏、动画和多媒体领域)来激发学生的学习兴趣,为求解这些问题,适时地引入相关的语法和库。
可以灵活介绍GUI相关主题。第1~6章使用内置的Turtle图形模块,其余部分使用Tkinter,这两种工具都是简单、易学的程序设计教学工具。每章的开始都有GUI实例,每章末尾还有专门的GUI练习。

作者简介
Y. Daniel Liang(梁勇) 阿姆斯特朗亚特兰大州立大学计算机科学系Yamacraw教授。之前曾是普度大学计算机科学系副教授,并曾两次获得普度大学杰出研究奖。他所编写的Java教程在美国大学Java课程中采用率最高。

上架指导

计算机\程序设计

封底文字

本书保持了Liang博士系列丛书中一贯的、标志性的教与学的哲学:以实例教,由实践学。书中采用了他所提出的已经经过实践检验的“基础先行”的方法,即在定义类之前,首先使用清晰简明的语言介绍基本程序设计概念,如选择语句、循环和函数;在介绍面向对象程序设计和GUI编程之前,首先介绍基本逻辑和程序设计概念。书中除了给出一些以游戏和数学为主的典型实例外,还在每章的开始使用简单的图形给出一两个例子,以激发学生的学习兴趣。
本书特色
 以“基础先行”方法介绍基本程序设计概念和方法,帮助学生循序渐进地学习所有必需和重要的基本概念。
 以“问题驱动”方法讲授程序设计技术,强调问题求解,而非语法。通过广泛的趣味性实例(涉及数学、自然科学、商业、金融、游戏、动画和多媒体领域)来激发学生的学习兴趣,为求解这些问题,适时地引入相关的语法和库。
 可以灵活介绍GUI相关主题。第1~6章使用内置的Turtle图形模块,其余部分使用Tkinter,这两种工具都是简单、易学的程序设计教学工具。每章的开始都有GUI实例,每章末尾还有专门的GUI练习。

作者简介

(美)Y. Daniel Liang 著 阿姆斯特朗亚特兰大州立大学:Y. Daniel Liang(梁勇) 阿姆斯特朗亚特兰大州立大学计算机科学系Yamacraw教授。之前曾是普度大学计算机科学系副教授,并曾两次获得普度大学杰出研究奖。他所编写的Java教程在美国大学Java课程中采用率最高。 有作者照片加以下两本书的小封面和相关信息: Java语言程序设计 基础篇(原书第8版) Java语言程序设计 进阶篇(原书第8版)书号:978-7-111-34081-2 书号:978-7-111-34236-6 定价:75.00元 定价:79.00元

图书目录

Chapter 1 Introduction to Computers, Programs,
and Python 1
1.1 Introduction 2
1.2 What Is a Computer 2
1.3 Programming Languages 9
1.4 Operating Systems 12
1.5 The History of Python 13
1.6 Getting Started with Python 14
1.7 Programming Style and Documentation 18
1.8 Programming Errors 19
1.9 Getting Started with Graphics Programming 21
Chapter 2 Elementary Programming 31
2.1 Introduction 32
2.2 Writing a Simple Program 32
2.3 Reading Input from the Console 34
2.4 Identifiers 36
2.5 Variables, Assignment Statements, and Expressions 36
2.6 Simultaneous Assignments 38
2.7 Named Constants 39
2.8 Numeric Data Types and Operators 40
2.9 Evaluating Expressions and Operator Precedence 43
2.10 Augmented Assignment Operators 44
2.11 Type Conversions and Rounding 45
2.12 Case Study: Displaying the Current Time 46
2.13 Software Development Process 48
2.14 Case Study: Computing Distances 52
Chapter 3 Mathematical Functions, Strings, and Objects 63
3.1 Introduction 64
3.2 Common Python Functions 64
3.3 Strings and Characters 67
3.4 Case Study: Minimum Number of Coins 72
3.5 Introduction to Objects and Methods 74
3.6 Formatting Numbers and Strings 76
3.7 Drawing Various Shapes 81
3.8 Drawing with Colors and Fonts 83
Chapter 4 Selections 91
4.1 Introduction 92
4.2 Boolean Types, Values, and Expressions 92
4.3 Generating Random Numbers 93
4.4 if Statements 95
4.5 Case Study: Guessing Birthdays 96
4.6 Two-Way if-else Statements 100
4.7 Nested if and Multi-Way if-elif-else Statements 102
4.8 Common Errors in Selection Statements 105
4.9 Case Study: Computing Body Mass Index 107
4.10 Case Study: Computing Taxes 108
4.11 Logical Operators 110
4.12 Case Study: Determining Leap Years 113
4.13 Case Study: Lottery 114
4.14 Conditional Expressions 116
4.15 Operator Precedence and Associativity 117
4.16 Detecting the Location of an Object 118
Chapter 5 Loops 133
5.1 Introduction 134
5.2 The while Loop 134
5.3 The for Loop 143
5.4 Nested Loops 145
5.5 Minimizing Numerical Errors 147
5.6 Case Studies 148
5.7 Keywords break and continue 151
5.8 Case Study: Displaying Prime Numbers 154
5.9 Case Study: Random Walk 156
Chapter 6 Functions 171
6.1 Introduction 172
6.2 Defining a Function 172
6.3 Calling a Function 173
6.4 Functions with/without Return Values 176
6.5 Positional and Keyword Arguments 179
6.6 Passing Arguments by Reference Values 180
6.7 Modularizing Code 183
6.8 Case Study: Converting Decimals to Hexadecimals 185
6.9 The Scope of Variables 187
6.10 Default Arguments 189
6.11 Returning Multiple Values 190
6.12 Case Study: Generating Random ASCII Characters 191
6.13 Function Abstraction and Stepwise Refinement 192
6.14 Case Study: Reusable Graphics Functions 199
Chapter 7 Objects and Classes 215
7.1 Introduction 216
7.2 Defining Classes for Objects 216
7.3 UML Class Diagrams 222
7.4 Immutable Objects vs. Mutable Objects 225
7.5 Hiding Data Fields 227
7.6 Class Abstraction and Encapsulation 229
7.7 Object-Oriented Thinking 233
Chapter 8 More on Strings and Special Methods 241
8.1 Introduction 242
8.2 The str Class 242
8.3 Case Study: Checking Palindromes 253
8.4 Case Study: Converting Hexadecimals to Decimals 254
8.5 Operator Overloading and Special Methods 257
8.6 Case Study: The Rational Class 258
Chapter 9 GUI Programming Using Tkinter 271
9.1 Introduction 272
9.2 Getting Started with Tkinter 272
9.3 Processing Events 273
9.4 The Widget Classes 275
9.5 Canvas 280
9.6 The Geometry Managers 283
9.7 Case Study: Loan Calculator 287
9.8 Displaying Images 288
9.9 Menus 290
9.10 Popup Menus 292
9.11 Mouse, Key Events, and Bindings 294
9.12 Animations 297
9.13 Scrollbars 300
9.14 Standard Dialog Boxes 301
Chapter 10 Lists 313
10.1 Introduction 314
10.2 List Basics 315
10.3 Case Study: Lotto Numbers 325
10.4 Case Study: Deck of Cards 327
10.5 Deck of Cards GUI 329
10.6 Copying Lists 330
10.7 Passing Lists to Functions 332
10.8 Returning a List from a Function 334
10.9 Case Study: Counting the Occurrences of Each Letter 335
10.10 Searching Lists 338
10.11 Sorting Lists 341
10.12 Case Study: Bouncing Balls 345
Chapter 11 Multidimensional Lists 361
11.1 Introduction 362
11.2 Processing Two-Dimensional Lists 362
11.3 Passing Two-Dimensional Lists to Functions 365
11.4 Problem: Grading a Multiple-Choice Test 367
11.5 Problem: Finding the Closest Pair 368
11.6 GUI: Finding the Closest Pair 370
11.7 Problem: Sudoku 372
11.8 Case Study: Sudoku GUI 375
11.9 Multidimensional Lists 377
Chapter 12 Inheritance and Polymorphism 399
12.1 Introduction 400
12.2 Superclasses and Subclasses 400
12.3 Overriding Methods 405
12.4 The object Class 406
12.5 Polymorphism and Dynamic Binding 409
12.6 The isinstance Function 411
12.7 Case Study: A Reusable Clock 414
12.8 Class Relationships 418
12.9 Case Study: Designing the Course Class 421
12.10 Designing a Class for Stacks 423
12.11 Case Study: The FigureCanvas Class 425
Chapter 13 Files and Exception Handling 439
13.1 Introduction 440
13.2 Text Input and Output 440
13.3 File Dialogs 448
13.4 Case Study: Counting Each Letter in a File 451
13.5 Retrieving Data from the Web 452
13.6 Exception Handling 454
13.7 Raising Exceptions 457
13.8 Processing Exceptions Using Exception Objects 460
13.9 Defining Custom Exception Classes 460
13.10 Binary IO Using Pickling 465
13.11 Case Study: Address Book 467
Chapter 14 Tuples, Sets, and Dictionaries 475
14.1 Introduction 476
14.2 Tuples 476
14.3 Sets 479
14.4 Comparing the Performance of Sets and Lists 485
14.5 Case Study: Counting Keywords 486
14.6 Dictionaries 487
14.7 Case Study: Occurrences of Words 492
Chapter 15 Recursion 499
15.1 Introduction 500
15.2 Case Study: Computing Factorials 500
15.3 Case Study: Computing Fibonacci Numbers 503
15.4 Problem Solving Using Recursion 505
15.5 Recursive Helper Functions 507
15.6 Case Study: Finding the Directory Size 510
15.7 Case Study: Towers of Hanoi 512
15.8 Case Study: Fractals 515
15.9 Case Study: Eight Queens 518
15.10 Recursion vs. Iteration 520
15.11 Tail Recursion 521
A detailed table of contents for the Web chapters is available on the companion Website:
Chapter 16 Developing Efficient Algorithms 16–1
Chapter 17 Sorting 17–1
Chapter 18 Linked Lists, Stacks, Queues,and Priority Queues 18–1
Chapter 19 Binary Search Trees 19–1
Chapter 20 AVL Trees 20–1
Chapter 21 Hashing: Implementing Dictionaries and Sets 21–1
Chapter 22 Graphs and Applications 22-1
Chapter 23 Weighted Graphs and Applications 23-1
APPENDIXES
Appendix A Python Keywords 533
Appendix B The ASCII Character Set 534
Appendix C Number Systems 536
INDEX 541
CREDITS 557
LOCATION OF VIDEONOTES IN THE TEXT
Chapter 1 Start with Python, p. 14
Start with Turtle graphics, p. 21
Chapter 2 Assignment statement, p. 37
Perform computation, p. 40
Chapter 3 String operations, p. 75
Draw shapes, p. 81
Chapter 4 Boolean expressions, p. 92
Coffee price, p. 123
Chapter 5 while loop, p. 134
for loop, p. 143
Chapter 6 Use functions, p. 172
Divide and conquer, p. 192
Chapter 7 Define and use classes, p. 217
Private data fields, p. 227
Chapter 8 String methods, p. 242
Define classes, p. 258
Chapter 9 Simple GUI, p. 273
Create GUI application, p. 287
Chapter 10 Use lists, p. 315
Search a list, p. 338
Chapter 11 Process a matrix, p. 362
Chessboard, p. 394
Chapter 12 Inheritance and polymorphism, p. 400
Dynamic binding, p. 409
Chapter 13 Process text file, p. 443
Handle exceptions, p. 454
Chapter 14 Use sets, p. 479
Use dictionaries, p. 488
Chapter 15 Function sum, p. 500
Function print numbers, p. 506

教学资源推荐
作者: 陈帆 和红杰 周荣辉
作者: (美)John R.Hubbard
作者: 陈家骏 郑滔 编著
作者: 刘燕君,刘振安,孙忱
参考读物推荐
作者: 满硕泉 著
作者: Jesse Liberty, David B.Horvath, CCP
作者: 王浩,王慧