Introduction to Python Programming and Data Structures Second Edition

Introduction to Python Programming and Data Structures Second Edition by Y. Daniel Liang is an interactive ebook, called Revel for Liang Python, which is the second edition improved upon the first edition. The Revel book has the built-in interactives for CodeAnimation, LiveExample, and AlgorithmAnimation. These interactives are very helpful for new students to learn programming. Instructors can assign auto-graded small exercises and projects.

How to Access Revel?

The Revel version can be accessed from revel.pearson.com. Use your Pearson username to login. If you don't have a Pearson account, request it from your Pearson Representative.

Key New Features:

  1. The title is changed to Introduction to Python Programming and Data Structures with new enhancements on data structures. The book first introduces using data structures and then implementing data structures. The book covers all topics in a typical data structures course.
  2. The selection statements are moved from Chapter 4 (in 1E) to Chapter 3 (in 2E) to give students opportunity to learn this simple programming constructs to write interesting code early.
  3. The lists are moved from Chapter 10 (in 1E) to Chapter 7 (in 2E) to enable students to write the code to store and process a collection of data early.
  4. Chapter 9 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.
  5. Chapters 16–23 are brand new chapters for introducing data structures using Python. New appendixes on regular expressions, command-line arguments, and bitwise operations are added to this edition.
  6. Many chapters in early part of the book have a section on common errors and pitfalls to steer students away from common programming errors.
  7. 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 and exercises in the book.)
  8. 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.)
  9. Provided additional exercises not printed in the book. These exercises are available for instructors only.

The following table shows the correlation of the changes to the previous edition.

Correlation to the Previous Edition

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
  • Brand new chapter
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
  • New exercise 14.2.
Chapter 14
Chapter 15 Recursion
  • Added a code example for tail recursion.
Chapter 15
Chapter 16 Developing Efficiency Algorithms
  • Brand new.
Chapter 17 Sorting
  • Brand new.
Chapter 18 Linked Lists, Stacks, Queues, and Priority Queues
  • Brand new.
Chapter 19 Binary Search Trees
  • Brand new.
Chapter 20 AVL Trees
  • Brand new.
Chapter 21 Hashing: Implementing Dictionaries and Sets
  • Brand new.
Chapter 22 Graphs and Applications
  • Brand new.
Chapter 23 Weighted Graphs and Applications
  • Brand new.