Working in Python#
(adapted from Allen Downey’s Think Python, Third Edition - see details at bottom)
Multiple ways to read this book#
JupyterLite Chapters - Every chapter on the left opens a notebook in your browser that you can work through at your own pace.
JupyterLite Lab - Opens a lab notebook of all chapters and exercises that you can work through in one IDE.
Read Only View - Provides straight HTML for every chapter that you can easily peruse or print.
Google Colab - All chapters have a colab link that lets you run and test code in google colab. Changes you make in this environment more reliably persist, but not all students have access to google colab.
Platform Notes#
JupyterLite runs entirely in a user’s browser. It is fast. It persists data to the user’s browser. When this site is updated, that data is lost. It is best to use the File->Download option inside JupyterLite to download important notebooks.
Google Colab - This is a fantastic platform when available.
Codespaces - Jupyter notebooks can be run in Github codespaces. These are a bit slow, but do persist. They also allow raw shell access and many other features.
What we cover, and when#
Chapters 1 through 11 are the fall semester, roughly one per week. That is the great majority of the programming content on the AP exam.
Chapters 12 and 13 come after the exam. Chapter 12 is the best explanation I know of how tools like ChatGPT actually work.
Chapters 14 through 19 cover object-oriented programming. Not required, not graded, unedited from Downey’s original. Start there if you finish the course wanting more Python.
The exam also covers the internet, data representation, cybersecurity, and the effects of computing on people. None of that is in this book. It is in the Little Brother unit, and it is close to half the exam, so do not treat it as the easy part of the year.
Also here#
About this book — why it exists, what changed from the original, licensing
AP CSP Standards Reference — every AP CSP topic, and which chapters cover it
CA CS Standards Reference — every core 9-12 California CS standard, and which chapters cover it
CSTA 2026 Standards Reference — the CSTA 2026 revision’s High School-level standards (chapter alignment not done yet)
CA ICT & Anchor Standards Reference — the CTE Anchor Standards plus the ICT sector’s Software and Systems Development pathway (chapter alignment not done yet)
What’s Next — standards alignment and chapter work still in progress
Working in Python — modified by Eric Brown for a high school Computer Science Principles class. Source and modifications: github.com/porttack/working-in-python
Copyright 2024 Allen B. Downey
Code license: MIT License
Text license: Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International