This Book (2E) |
What's New |
Previous Book (1E) |
New Feature Summary (Global Changes) |
- Move selection statements from Chapter 4 (in 1E) to Chapter 3 (in 2E) to give students opportunity to learn this simple
programming constructs to write interesting code.
- Move lists early from Chapter 11 (in 1E) to Chapter 7
(in 2E) to enable students to write the code to store and
process a collection of data early.
- Chapter 10 in 1E are split into two chapters 10 and 11 in this edition to give more in-depth coverage on Python GUI programming using Tkinter.
- Chapters 16-23 are brand new chapters for introducing data structures using Python.
- Many chapters in early part of the book have a section on common errors and pitfalls to steer students away from common programming errors.
- The int and float functions are used to convert a string
into an integer or a float value, rather than using the eval
function. Using the int and float functions makes the code
more intuitive, robust, and secure. (This change triggers rewriting many
programs in the book.)
- This edition provides many new examples and exercises to
motivate and stimulate student interest in programming.
(This is the hallmark for every new edition of the Liang
book.)
- Provided additional exercises not printed in the book.
These exercises are available for
instructors only.
|
|
Chapter 1 Introduction to
Computers, Programs, and Python |
- The introduction to computers and programming languages
has been updated.
- Move the section on syntax errors, runtime errors, and logic errors from Chapter 2 to Chapter 1 to
introduce programming errors early on.
- Move programming style and doc here from Chapter 2 to Chapter 1 to foster good programming style early.
|
Chapter 1 |
Chapter 2 Elementary Programming |
- New introductory problem to motivate students.
- Add software development process section to introduce analysis and design as well coding.
- Expand the coverage on debugging.
- Add a new section on Common Errors and Pitfalls
- Move the section on syntax errors, runtime errors, and logic errors to Chapter 1 to
introduce programming errors early on.
- Move the section on syntax errors, runtime errors, and logic errors to Chapter 1 to
introduce programming errors early on.
- The int and float functions are used to convert a string
into an integer or a float value, rather than using the eval
function. Using the int and float functions makes the code
more intuitive, robust, and secure.
|
Chapter 2 |
Chapter 3 Selections |
- New figure to show multiple-alternative if statements
- Add a new section on Common Errors and Pitfalls
- Add debugging in this chapter.
- Move examples and exercises using characters and strings such as the GuessBirthday case study to Chapter 4.
- The int and float functions are used to convert a string
into an integer or a float value, rather than using the eval
function. Using the int and float functions makes the code
more intuitive, robust, and secure.
|
Chapter 4 |
Chapter 4 Mathematical
Functions, Strings, and Objects |
- New examples GuessBirthday, HexDigit2Dec
- Introduce more str methods.
- New exercises 4.14-4.37.
- The int and float functions are used to convert a string
into an integer or a float value, rather than using the eval
function. Using the int and float functions makes the code
more intuitive, robust, and secure.
|
Chapter 3 |
Chapter 5 Loops |
- The long section 5.2 is split into new Sections 5.2, 5.3, 5.4, and 5.5.
- New AdditionQuiz example to terminate the loop until a correct answer is
entered.
-
Move the case study on approximating pi to supplement on the companion Website.
- New examples using strings.
- New exercises 5.56-5.59.
- The int and float functions are used to convert a string
into an integer or a float value, rather than using the eval
function. Using the int and float functions makes the code
more intuitive, robust, and secure.
|
Chapter 5 |
Chapter 6 Functions |
- Revise several diagrams.
- New examples using strings.
- New Exercises 6.49–6.55.
- The int and float functions are used to convert a string
into an integer or a float value, rather than using the eval
function. Using the int and float functions makes the code
more intuitive, robust, and secure.
|
Chapter 6 |
Chapter 7 Lists |
- Move lists early from Chapter 11 (in 1E) to Chapter 7
(in 2E) to enable students to write the code to store and
process a collection of data early.
- New examples involving strings.
- Move insertion sort to Chapter 17.
- Revised several diagrams.
- New Exercises 7.35–7.37.
|
Chapter 11 |
Chapter 8 Multidimensional Lists |
- New problem-driven introduction.
- A simplified version of Sudoku is presented to make the example accessible to novice students.
|
Chapter 11 |
Chapter 9 Objects and Classes |
- New problem-driven introduction.
- New section on special methods for operators.
- New section on the Rational class.
- New exercises 9.32-9.37.
|
Chapter 7 |
Chapter 10 Basic GUI Programming Using Tkinter |
- New example on Sudoku GUI.
- New example on displaying images of four cards.
|
Chapter 9 |
Chapter 11 Advanced GUI Programming Using Tkinter |
|
|
Chapter 12 Inheritance and Polymorphism |
- New section on discovering relationships among classes.
|
Chapter 12 |
Chapter 13 Files and Exception
Handling |
- Add a new section on developing a Web crawler.
- New exercises 13.17 and 13.19.
|
Chapter 13 |
Chapter 14 Tuples, Sets, and Dictionaries |
|
Chapter 14 |
Chapter 15 Recursion |
- Added a code example for tail recursion.
|
Chapter 15 |
Chapter 16 Developing Efficiency Algorithms |
|
|
Chapter 17 Sorting |
|
|
Chapter 18 Linked Lists, Stacks, Queues, and Priority Queues |
|
|
Chapter 19 Binary Search Trees |
|
|
Chapter 20 AVL Trees |
|
|
Chapter 21 Hashing: Implementing Dictionaries and Sets |
|
|
Chapter 22 Graphs and Applications |
|
|
Chapter 23 Weighted Graphs and Applications |
|
|