Introduction to Python Programming and Data Structures, Global Edition
For introductory courses in Python Programming and Data Structures. A fundamentals first approach to programming helps students create efficient, elegant code Revel(tm) Introduction to Python Programming and Data Structures introduces students to basic programming concepts using a fundamentals-first...
Autor principal: | |
---|---|
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
Harlow :
Pearson Education, Limited
2022.
|
Edición: | 3rd ed |
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009863799406719 |
Tabla de Contenidos:
- Cover
- Digital Resources for Students
- Title Page
- Copyright
- Preface
- Brief Contents
- Contents
- VideoNotes
- Chapter 1. Introduction to Computers, Programs, and Python
- 1.1 Introduction
- 1.2 What Is a Computer?
- 1.3 Programming Languages
- 1.4 Operating Systems
- 1.5 The History of Python
- 1.6 Getting Started with Python
- 1.7 Programming Style and Documentation
- 1.8 Programming Errors
- 1.9 Getting Started with Graphics Programming
- Chapter 2. Elementary Programming
- 2.1 Introduction
- 2.2 Writing a Simple Program
- 2.3 Reading Input from the Console
- 2.4 Identifiers
- 2.5 Variables, Assignment Statements, and Expressions
- 2.6 Simultaneous Assignments
- 2.7 Named Constants
- 2.8 Numeric Data Types and Operators
- 2.9 Case Study: Minimum Number of Changes
- 2.10 Evaluating Expressions and Operator Precedence
- 2.11 Augmented Assignment Operators
- 2.12 Type Conversions and Rounding
- 2.13 Case Study: Displaying the Current Time
- 2.14 Software Development Process
- 2.15 Case Study: Computing Distances
- Chapter 3. Selections
- 3.1 Introduction
- 3.2 Boolean Types, Values, and Expressions
- 3.3 Generating Random Numbers
- 3.4 if Statements
- 3.5 Two-Way if-else Statements
- 3.6 Nested if and Multi-Way if-elif-else Statements
- 3.7 Common Errors in Selection Statements
- 3.8 Case Study: Computing Body Mass Index
- 3.9 Case Study: Computing Taxes
- 3.10 Logical Operators
- 3.11 Case Study: Determining Leap Years
- 3.12 Case Study: Lottery
- 3.13 Conditional Expressions
- 3.14 Python 3.10 match-case Statements
- 3.15 Operator Precedence and Associativity
- 3.16 Detecting the Location of an Object
- Chapter 4. Mathematical Functions, Strings, and Objects
- 4.1 Introduction
- 4.2 Common Python Functions
- 4.3 Strings and Characters.
- 4.4 Case Study: Revising the Lottery Program Using Strings
- 4.5 Introduction to Objects and Methods
- 4.6 String Methods
- 4.7 Case Studies
- 4.8 Formatting Numbers and Strings
- 4.9 Drawing Various Shapes
- 4.10 Drawing with Colors and Fonts
- Chapter 5. Loops
- 5.1 Introduction
- 5.2 The while Loop
- 5.3 Case Study: Guessing Numbers
- 5.4 Loop Design Strategies
- 5.5 Controlling a Loop with User Confirmation and Sentinel Value
- 5.6 The for Loop
- 5.7 Nested Loops
- 5.8 Minimizing Numerical Errors
- 5.9 Case Studies
- 5.10 Keywords break and continue
- 5.11 Case Study: Checking Palindromes
- 5.12 Case Study: Displaying Prime Numbers
- 5.13 Case Study: Random Walk
- Chapter 6. Functions
- 6.1 Introduction
- 6.2 Defining a Function
- 6.3 Calling a Function
- 6.4 Functions with/without Return Values
- 6.5 Positional and Keyword Arguments
- 6.6 Passing Arguments by Reference Values
- 6.7 Modularizing Code
- 6.8 The Scope of Variables
- 6.9 Default Arguments
- 6.10 Returning Multiple Values
- 6.11 Case Study: Generating Random ASCII Characters
- 6.12 Case Study: Converting Hexadecimals to Decimals
- 6.13 Function Abstraction and Stepwise Refinement
- 6.14 Case Study: Reusable Graphics Functions
- Chapter 7. Lists
- 7.1 Introduction
- 7.2 List Basics
- 7.3 Case Study: Analyzing Numbers
- 7.4 Case Study: Deck of Cards
- 7.5 Copying Lists
- 7.6 Passing Lists to Functions
- 7.7 Returning a List from a Function
- 7.8 Case Study: Counting the Occurrences of Each Letter
- 7.9 Searching Lists
- 7.10 Sorting Lists
- Chapter 8. Multidimensional Lists
- 8.1 Introduction
- 8.2 Processing Two-Dimensional Lists
- 8.3 Passing Two-Dimensional Lists to Functions
- 8.4 Problem: Grading a Multiple-Choice Test
- 8.5 Problem: Finding the Closest Pair
- 8.6 Problem: Sudoku
- 8.7 Multidimensional Lists.
- Chapter 9. Objects and Classes
- 9.1 Introduction
- 9.2 Defining Classes for Objects
- 9.3 UML Class Diagrams
- 9.4 Using Classes from the Python Library: the datetime Class
- 9.5 Immutable Objects vs. Mutable Objects
- 9.6 Hiding Data Fields
- 9.7 Class Abstraction and Encapsulation
- 9.8 Object-Oriented Thinking
- 9.9 Operator Overloading and Special Methods
- 9.10 Case Study: The Rational Class
- Chapter 10. Basic GUI Programming Using Tkinter
- 10.1 Introduction
- 10.2 Getting Started with Tkinter
- 10.3 Processing Events
- 10.4 The Widget Classes
- 10.5 Canvas
- 10.6 The Geometry Managers
- 10.7 Case Study: Loan Calculator
- 10.8 Case Study: Sudoku GUI
- 10.9 Displaying Images
- 10.10 Case Study: Deck of Cards GUI
- Chapter 11. Advanced GUI Programming Using Tkinter
- 11.1 Introduction
- 11.2 Combo Boxes
- 11.3 Menus
- 11.4 Pop-up Menus
- 11.5 Mouse, Key Events, and Bindings
- 11.6 Case Study: Finding the Closest Pair
- 11.7 Animations
- 11.8 Case Study: Bouncing Balls
- 11.9 Scrollbars
- 11.10 Standard Dialog Boxes
- Chapter 12. Inheritance and Polymorphism
- 12.1 Introduction
- 12.2 Superclasses and Subclasses
- 12.3 Overriding Methods
- 12.4 The object Class
- 12.5 Polymorphism and Dynamic Binding
- 12.6 The isinstance Function
- 12.7 Case Study: A Reusable Clock
- 12.8 Class Relationships
- 12.9 Case Study: Designing the Course Class
- 12.10 Case Study: Designing a Class for Stacks
- 12.11 Case Study: The FigureCanvas Class
- Chapter 13. Files and Exception Handling
- 13.1 Introduction
- 13.2 Text Input and Output
- 13.3 File Dialogs
- 13.4 Case Study: Counting Each Letter in a File
- 13.5 Retrieving Data from the Web
- 13.6 Exception Handling
- 13.7 Raising Exceptions
- 13.8 Processing Exceptions Using Exception Objects
- 13.9 Defining Custom Exception Classes.
- 13.10 Case Study: Web Crawler
- 13.11 Binary IO Using Pickling
- 13.12 Case Study: Address Book
- Chapter 14. Tuples, Sets, and Dictionaries
- 14.1 Introduction
- 14.2 Tuples
- 14.3 Sets
- 14.4 Comparing the Performance of Sets and Lists
- 14.5 Case Study: Counting Keywords
- 14.6 Dictionaries
- 14.7 Case Study: Occurrences of Words
- Chapter 15. Recursion
- 15.1 Introduction
- 15.2 Case Study: Computing Factorials
- 15.3 Case Study: Computing Fibonacci Numbers
- 15.4 Problem Solving Using Recursion
- 15.5 Recursive Helper Functions
- 15.6 Case Study: Finding the Directory Size
- 15.7 Case Study: Tower of Hanoi
- 15.8 Case Study: Fractals
- 15.9 Case Study: Eight Queens
- 15.10 Recursion vs. Iteration
- 15.11 Tail Recursion
- Chapter 16. Developing Efficient Algorithms
- 16.1 Introduction
- 16.2 Measuring Algorithm Efficiency Using Big O Notation
- 16.3 Examples: Determining Big O
- 16.4 Analyzing Algorithm Time Complexity
- 16.5 Finding Fibonacci Numbers Using Dynamic Programming
- 16.6 Finding Greatest Common Divisors Using Euclid's Algorithm
- 16.7 Efficient Algorithms for Finding Prime Numbers
- 16.8 Finding Closest Pair of Points Using Divide-and-Conquer
- 16.9 Solving the Eight Queen Problem Using Backtracking
- 16.10 Computational Geometry: Finding a Convex Hull
- 16.11 String Matching
- Chapter 17. Sorting
- 17.1 Introduction
- 17.2 Insertion Sort
- 17.3 Bubble Sort
- 17.4 Merge Sort
- 17.5 Quick Sort
- 17.6 Heap Sort
- 17.7 Bucket Sort and Radix Sort
- Chapter 18. Linked Lists, Stacks, Queues, and Priority Queues
- 18.1 Introduction
- 18.2 Linked Lists
- 18.3 The LinkedList Class
- 18.4 Implementing LinkedList
- 18.5 List vs. Linked List
- 18.6 Variations of Linked Lists
- 18.7 Iterators
- 18.8 Generators
- 18.9 Stacks
- 18.10 Queues
- 18.11 Priority Queues.
- 18.12 Case Study: Evaluating Expressions
- Chapter 19. Binary Search Trees
- 19.1 Introduction
- 19.2 Binary Search Trees Basics
- 19.3 Representing Binary Search Trees
- 19.4 Searching for an Element in BST
- 19.5 Inserting an Element into a BST
- 19.6 Tree Traversal
- 19.7 The BST Class
- 19.8 Deleting Elements in a BST
- 19.9 Tree Visualization
- 19.10 Case Study: Data Compression
- Chapter 20. AVL Trees
- 20.1 Introduction
- 20.2 Rebalancing Trees
- 20.3 Designing Classes for AVL Trees
- 20.4 Overriding the insert Method
- 20.5 Implementing Rotations
- 20.6 Implementing the delete Method
- 20.7 The AVLTree Class
- 20.8 Testing the AVLTree Class
- 20.9 Maximum Height of an AVL Tree
- Chapter 21. Hashing
- 21.1 Introduction
- 21.2 What Is Hashing?
- 21.3 Hash Functions and Hash Codes
- 21.4 Handling Collisions Using Open Addressing
- 21.5 Handling Collisions Using Separate Chaining
- 21.6 Load Factor and Rehashing
- 21.7 Implementing a Map Using Hashing
- 21.8 Implementing a Set Using Hashing
- Chapter 22. Graphs and Applications
- 22.1 Introduction
- 22.2 Basic Graph Terminologies
- 22.3 Representing Graphs
- 22.4 Modeling Graphs
- 22.5 Graph Visualization
- 22.6 Graph Traversals
- 22.7 Depth-First Search (DFS)
- 22.8 Case Study: The Connected Circles Problem
- 22.9 Breadth-First Search (BFS)
- 22.10 Case Study: The Nine Tail Problem
- Chapter 23. Weighted Graphs and Applications
- 23.1 Introduction
- 23.2 Representing Weighted Graphs
- 23.3 The WeightedGraph Class
- 23.4 Minimum Spanning
- 23.5 Finding Shortest Paths
- 23.6 Case Study: The Weighted Nine Tail Problem
- Appendixes
- Appendix A. Python Keywords
- Appendix B. The ASCII Character Set
- Appendix C. Number Systems
- Appendix D. Command Line Arguments
- Appendix E. Regular Expressions
- Appendix F. Bitwise Operations.
- Appendix G. The Big-O, Big-Omega, and Big-Theta Notations.