Fundamentals of Python: First Programs, 2nd Edition
Book information
Description
Master today's required computer science topics while preparing for further study with Lambert's FUNDAMENTALS OF PYTHON: FIRST PROGRAMS. This book's easygoing approach is ideal for readers with any type of background. The approach starts with simple algorithmic code and then scales into working with functions, objects, and classes as the problems become more complex and require new abstraction mechanisms. Rather than working only with numeric or text-based applications like other introductions, this edition presents graphics, image manipulation, GUIs, and simple networked client/server applications. The author uses Python's standard Turtle graphics module to introduce graphics and to provide open source frameworks for easy image processing and GUI application development.Important Notice: Media content referenced within the product description or the product text may not be available in the ebook version. Cover......Page 1 Table of Contents......Page 5 Preface......Page 15 Chapter 1: Introduction......Page 23 Two Fundamental Ideas of Computer Science: Algorithms and Information Processing......Page 24 Exercises......Page 27 The Structure of a Modern Computer System......Page 28 A Not-So-Brief History of Computing Systems......Page 31 Getting Started with Python Programming......Page 44 Detecting and Correcting Syntax Errors......Page 51 Suggestions for Further Reading......Page 52 Summary......Page 53 Review Questions......Page 54 Projects......Page 55 Chapter 2: Software Development, Data Types, and Expressions......Page 56 The Software Development Process......Page 57 Exercises......Page 59 Case Study: Income Tax Calculator......Page 60 Strings, Assignment, and Comments......Page 63 Exercises......Page 68 Numeric Data Types and Character Sets......Page 69 Expressions......Page 71 Exercises......Page 75 Using Functions and Modules......Page 76 Summary......Page 81 Review Questions......Page 83 Projects......Page 84 Chapter 3: Loops and Selection Statements......Page 86 Definite Iteration: The for Loop......Page 87 Formatting Text for Output......Page 92 Exercises......Page 94 Case Study: An Investment Report......Page 95 Selection: if and if-else Statements......Page 99 Exercises......Page 107 Conditional Iteration: The while Loop......Page 108 Case Study: Approximating Square Roots......Page 114 Summary......Page 118 Review Questions......Page 119 Projects......Page 121 Chapter 4: Strings and Text Files......Page 124 Accessing Characters and Substrings in Strings......Page 125 Data Encryption......Page 128 Strings and Number Systems......Page 131 Exercises......Page 136 String Methods......Page 137 Text Files......Page 140 Exercises......Page 147 Case Study: Text Analysis......Page 148 Summary......Page 152 Review Questions......Page 153 Projects......Page 154 Chapter 5: Lists and Dictionaries......Page 156 Lists......Page 157 Exercises......Page 167 Defining Simple Functions......Page 168 Exercises......Page 171 Case Study: Generating Sentences......Page 172 Dictionaries......Page 175 Exercises......Page 180 Case Study: Nondirective Psychotherapy......Page 181 Summary......Page 185 Review Questions......Page 186 Projects......Page 187 Chapter 6: Design with Functions......Page 189 A Quick Review of What Functions Are and How They Work......Page 190 Exercises......Page 193 Problem Solving with Top-Down Design......Page 194 Design with Recursive Functions......Page 198 Exercises......Page 204 Case Study: Gathering Information from a File System......Page 205 Managing a Program's Namespace......Page 212 Exercises......Page 216 Higher-Order Functions......Page 217 Exercises......Page 221 Summary......Page 222 Review Questions......Page 224 Projects......Page 225 Chapter 7: Simple Graphics and Image Processing......Page 227 Simple Graphics......Page 228 Case Study: Recursive Patterns in Fractals......Page 240 Image Processing......Page 244 Summary......Page 259 Review Questions......Page 260 Projects......Page 262 Chapter 8: Graphical User Interfaces......Page 266 The Behavior of Terminal-Based Programs and GUI-Based Programs......Page 267 Coding Simple GUI-Based Programs......Page 271 Windows and Window Components......Page 275 Exercises......Page 281 Command Buttons and Responding to Events......Page 282 Input and Output with Entry Fields......Page 284 Defining and Using Instance Variables......Page 289 Case Study: The Guessing Game Revisited......Page 291 Other Useful GUI Resources......Page 295 Review Questions......Page 311 Projects......Page 312 Chapter 9: Design with Classes......Page 315 Getting Inside Objects and Classes......Page 316 Case Study: Playing the Game of Craps......Page 323 Data-Modeling Examples......Page 331 Case Study: An ATM......Page 346 Building a New Data Structure: The Two-Dimensional Grid......Page 352 Case Study: Data Encryption with a Block Cipher......Page 355 Structuring Classes with Inheritance and Polymorphism......Page 359 Exercises......Page 368 Summary......Page 369 Review Questions......Page 370 Projects......Page 371 Chapter 10: Multithreading, Networks, and Client/Server Programming......Page 374 Threads and Processes......Page 375 The Readers and Writers Problem......Page 386 Networks, Clients, and Servers......Page 393 Exercises......Page 402 Case Study: Setting Up Conversations between Doctors and Patients......Page 403 Summary......Page 408 Review Questions......Page 409 Projects......Page 410 Chapter 11: Searching, Sorting, and Complexity Analysis......Page 412 Measuring the Efficiency of Algorithms......Page 413 Exercises......Page 418 Complexity Analysis......Page 419 Search Algorithms......Page 423 Basic Sort Algorithms......Page 427 Exercises......Page 432 Faster Sorting......Page 433 Exercises......Page 440 An Exponential Algorithm: Recursive Fibonacci......Page 441 Converting Fibonacci to a Linear Algorithm......Page 442 Case Study: An Algorithm Profiler......Page 443 Summary......Page 449 Review Questions......Page 450 Projects......Page 451 Appendix A: Python Resources......Page 454 Appendix B: Installing the images and breezypythongui Libraries......Page 456 Appendix C: The API for Image Processing......Page 458 Appendix D: Transition from Python to Java and C++......Page 460 Glossary......Page 461 Index......Page 477
Similar books
Fundamentals Of Python: First Programs (MindTap Course List)
2023 · PDF
Python Programming for Teens
2014 · PDF
Fundamentals of Python: First Programs
2011 · PDF
Fundamentals of Python: First Programs
2018 · PDF
Fundamentals Of Python: Data Structures
2018 · PDF
Fundamentals Of Python: Data Structures
2018 · PDF
Python Programming for Teens
2014 · PDF
Fundamentals of Python: First Programs
2011 · PDF