Unit 1 · Foundational
Python Foundations
Variables, types, operators, and control flow. Python hides type declarations, which makes the language friendly to start and makes type errors appear later than they would elsewhere.
Python Programming Study Guide
Eight units from first syntax through data science and visualization to AI/ML readiness. Each unit explains what to know, how to apply it, what typically goes wrong, and one study move that makes the material stick.
Eight units
Foundations, functions and design, collections and algorithms, object-oriented Python, files and APIs, data science, visualization, then AI/ML readiness.
No single exam
This is a school and enrichment course rather than a College Board one, so assessment is by projects, quizzes, and implementation work.
Wide entry range
Suitable from middle school through college. Units 1 to 4 assume no prior programming; Units 6 to 8 assume comfort with functions and collections.
Where it leads
AP Computer Science Principles, data science coursework, and the AI/ML course.
Units
Unit 1 is the largest by a wide margin. The rest move faster, and the last one is the bridge into calculus.
Unit 1 · Foundational
Variables, types, operators, and control flow. Python hides type declarations, which makes the language friendly to start and makes type errors appear later than they would elsewhere.
Unit 2 · Foundational
Decomposition, and the scope rules that make it safe. This is the unit that decides whether later programs stay readable as they grow.
Unit 3 · Heavy
The four built-in collections and the habit of choosing between them. Most of the awkwardness in beginner Python comes from solving a dictionary problem with parallel lists.
Unit 4 · Moderate
Classes in a language with no enforced privacy. Encapsulation here is a convention the programmer upholds rather than a rule the language imposes, which changes how it must be taught.
Unit 5 · Moderate
Where Python stops being an exercise and starts touching real data. The unit adds a new category of failure: the input may be missing, malformed, or unavailable, and correct code has to survive that.
Unit 6 · Heavy
NumPy and pandas, and the shift from writing loops to describing operations on whole columns. Most of the difficulty is not syntax but knowing what a dataset actually contains before analysing it.
Unit 7 · Moderate
Turning an analysis into something another person can read and trust. The technical content is small; the judgement about honest presentation is the substance.
Unit 8 · Bridge unit
The bridge into the AI/ML course. It establishes the workflow and vocabulary rather than the models themselves, so a student arrives able to prepare data and judge a result.
Mathematical Practices
Four habits that decide whether Python code stays correct and readable as a program grows.
Before writing a loop, ask whether the data is a list, a dictionary, or a set. A great deal of awkward Python is a dictionary problem being solved with two parallel lists.
Python errors name the type, the line, and usually the cause. Reading the last line of a traceback before changing anything is the fastest debugging habit available in this language.
Empty list, single element, missing key, and an off-by-one slice are where Python code breaks. A function that works on a five-item example has not been tested.
Python code is read far more than it is written, and a name that describes the content is worth more than a comment explaining a name that does not.
Assessment
Two lists: one for selected-response work, one for anything you have to write out.
Study plan
Four moves, in the order that pays off.
These two structures carry most of the course. Being able to choose between them without thinking is the single highest-value early skill.
Decomposition is what separates a script that grows unmanageable from one that stays workable. Practise splitting before it hurts.
Spend a session deliberately causing and reading errors: type errors, key errors, index errors. Recognising them on sight saves hours later.
A program that reads data, processes it, and reports a result exercises Units 1 to 5 together and exposes gaps that unit-by-unit practice hides.
Units 6 and 7 are where Python starts paying off. Work with a messy dataset rather than a tidy teaching one.
Unit 8 is preparation, not the destination. Arrive with confident pandas and plotting rather than rushing to models.
Curriculum scope
Python is taught here as a tool for expressing a solution clearly, not as a list of syntax rules. The recurring question across every unit is which data structure represents the problem, because in Python that choice determines how short and how readable the rest of the solution is.
Essential foundations
Included in this sequence
Compare with the school syllabus
Glossary
Dynamic typing
Types belong to objects rather than to names, so a name may refer to different types over time.
Mutability
Whether an object can be changed in place. Lists, dictionaries, and sets can; strings and tuples cannot.
Comprehension
A compact expression that builds a list, dictionary, or set from an iterable.
Slice
A sub-sequence selected by start, stop, and step, where the stop index is excluded.
Traceback
The error report naming the exception type, the line, and the call path that reached it.
Key error
The exception raised when a dictionary is asked for a key it does not hold.
Module
A file of Python definitions imported for reuse.
DataFrame
The pandas table structure with labelled rows and columns.
Vectorised operation
An operation applied across a whole array or column at once rather than element by element in a loop.