Computer ScienceTextbook

Introduction to Computer Programming with Python

Not rated yetRate this book

Harris Wang’s introductory Python textbook places programming within the broader development of computing and provides a structured starting point for learning to write programs.

FormatExternal access
LanguageEnglish
SubjectComputer Science
LevelUndergraduate
No. of pages501
Published2023

Read on the publisher’s website. Opens in a new tab.

Introduction to Computer Programming with PythonFree

About this book

Harris Wang’s introductory Python textbook places programming within the broader development of computing and provides a structured starting point for learning to write programs.

This page introduces the source edition and offers a focused reading route. Use the linked original resource for the complete text, references, activities, and the author’s full explanation. The overview below is limited to the sections identified in the coverage note.

Contents and further reading

Consult the official book or repository page for the resource’s contents and publication information. Open the source PDF to read the complete available edition.

Sources and coverage

This original overview is based on publication information and selected opening historical discussion (PDF sheets 5 and 17–18), with contents checked. It is not a whole-book review. The verified source PDF contains 501 PDF sheets, including preliminary or repository pages; this may differ from its printed pagination. The source retains its own authorship, rights notices, and any separately credited third-party material.

Book summary

Harris Wang’s introduction develops Python programming through nine substantial chapters. It connects language foundations with control flow, errors, collections, functions, objects, modules, and graphical applications. The sequence aims at problem-solving and readable program design rather than memorizing commands. Later application work becomes easier when each earlier concept is understood as a tool for managing complexity.

Chapter-by-chapter summaries

Chapter 1: Introduction

The opening explains programming as a process of designing instructions and evaluating their execution. It establishes the environment and the relationship between a problem, an algorithm, and code. The reader should distinguish a program that runs from one that answers the intended question and begin using small examples to make behavior observable.

Chapter 2: Essential Building Blocks

Values, types, variables, expressions, and basic input or output establish the language's working vocabulary. Each operation has an effect that can be traced. This foundation matters because later errors often arise from a mistaken assumption about a value or representation rather than from an advanced feature of the language.

Chapter 3: Flow Control

Selection and repetition organize when statements execute. The chapter develops reasoning about conditions, loop progress, and boundaries. A program's path needs to match the cases in the original problem. Testing should include cases that exercise different branches and expose assumptions about empty input, equal values, or the final iteration.

Chapter 4: Errors and Exceptions

Errors arise at different stages and require different responses. The chapter connects diagnosis with exception handling and the behavior expected when an operation cannot complete normally. Handling an exception is not simply hiding a message: the program needs a defensible response that preserves meaningful behavior or communicates the problem clearly.

Chapter 5: Collections and Text Files

Sequences, sets, dictionaries, and files organize information in different ways. Choosing among them requires understanding ordering, uniqueness, associations, and persistence. The chapter links data representation with algorithms, showing why the same task becomes easier or harder depending on how its information is stored and accessed.

Chapter 6: Functions

Functions make a program into a set of manageable responsibilities. Inputs, outputs, and scope determine how those responsibilities interact. The chapter supports reuse and testing while encouraging meaningful decomposition. A function's purpose should be clear enough that its behavior can be explained independently of the whole program.

Chapter 7: Object-Oriented Programming

Objects combine related state and behavior, while classes describe shared structure. The chapter develops another way to model a problem and manage relationships in code. The useful question is not whether an object can be created, but whether its responsibilities and interactions make the design more understandable and consistent.

Chapter 8: Modules and Packages

Modules organize code beyond a single file and packages support broader reuse. Their interfaces determine what another part of the program can rely on. The chapter connects organization with the practical task of using existing functionality while keeping dependencies, names, and responsibilities comprehensible.

Chapter 9: Graphical Applications

A graphical application responds to user events rather than only following a simple command sequence. Interface elements, event handling, and program state need to work together. The final chapter integrates the earlier foundations into an application whose visible behavior must remain consistent with its underlying data and logic.

Study instructions

  1. Implement one small problem in stages, adding functions, files, and objects only when their role is clear.
  2. Use tracing and deliberately chosen tests to explain both normal and exceptional behavior.
  3. Compare two data representations for the same task and justify the choice.
  4. For a graphical project, draw the relationship among events, state changes, and displayed results before coding.

Sources and coverage

This original study guide follows the linked source edition and its chapters or explicitly identified sections. It condenses the main ideas and their relationships; examples and practice directions are for study alongside the complete text. Complete source edition.

About access & copyright

This page provides book information and study material. Full-text access is provided by the original publisher or authorised source; a listing does not grant permission to republish the book.

Read our Library Access & Copyright policy

Computing context

Programming belongs to a longer development of tools and ideas.

Active practice

Predict, execute, and explain small examples.

Reproducibility

Record the environment used for exercises.

Conceptual learning

Connect code with an account of what it does.

Reader ratings & reviews

Be the first to rate

No ratings yet

0%0%
0%0%
0%0%
0%0%
0%0%

Share your thoughts

Your review helps other students choose the right resources.

Rate this book

How helpful was this book?No sign-up needed. Your rating appears instantly.