Verwandte Artikel zu Python Programming: Volume 2: Intermediate —...

Python Programming: Volume 2: Intermediate — From Confident Beginner to Capable Programmer - Softcover

Buch 2 von 2: Python Programming

KUMAR, AJAY; RANI, KAVITA; SHAURY, ABHINAV; SHAURY, ABHINANDAN

 
9798161191347: Python Programming: Volume 2: Intermediate — From Confident Beginner to Capable Programmer

Inhaltsangabe

You know the basics of Python. This book shows you how to write programs that are organized, tested and easy to change.

Volume 2 of the Python Programming series moves in five stages. You start with deeper functions, closures, comprehensions and iteration tools. Next come modules, the standard library, pip, virtual environments and clean code with PEP 8, docstrings and type hints. Then you read and write files, CSV and JSON, handle exceptions properly, debug with confidence and write automated tests with unittest. The last stage covers object-oriented programming, dataclasses, enums, argparse and logging.

One project runs through the whole book: a Library Manager. Each chapter adds a new version that uses what you just learned, so by Chapter 18 you have built a complete command-line application step by step. Three extra mini projects give you more practice.

Every chapter has learning objectives, examples you can type and run, a Common Mistakes box, practice exercises, a challenge and a Quick Check with answers. Every program was run on Python 3.12, and the output shown is the output it really produced.

What you will learn:

  • Default, keyword, *args and **kwargs parameters, scope, closures, lambda functions and recursion
  • Comprehensions, enumerate, zip, sorted, map, filter, any and all
  • Modules, packages, the standard library, pip and virtual environments
  • Clean code: PEP 8, docstrings and type hints
  • Text files, pathlib, CSV and JSON
  • Exceptions in depth, custom exceptions, debugging with pdb and testing with unittest
  • Classes, properties, special methods, inheritance and polymorphism
  • Dataclasses, enums, argparse and logging

At the back: a quick reference, a guide to common errors, a glossary, a 27-question self-assessment quiz, hints for every exercise and an index.

For readers who have finished Volume 1 or already know Python's basics: variables, loops, conditionals, lists, dictionaries and simple functions.

Die Inhaltsangabe kann sich auf eine andere Ausgabe dieses Titels beziehen.