Python curriculum
A Python-first programming course that moves from fundamentals into testing, data structures, algorithms, files, and small applications.
Python curriculum
A Python-first programming course that moves from fundamentals into testing, data structures, algorithms, files, and small applications.
- Write readable Python programs with explicit inputs and outputs.
- Use decomposition, tests, and data structures to manage complexity.
- Build small command-line and data-driven projects without hidden state.
Unit sequence
Built for independent progress first, then tutor support where the student gets stuck.
- 01
Programming model and setup
- Use variables, expressions, types, and the REPL.
- Run scripts and read tracebacks.
Practice: Write small pure functions for unit conversion and string formatting.
Original practice checksAnswer in PeerTutor, then use the explanation or bring the miss to a tutor.
4 checked answersExpressionsWhat is the value of 7 // 3 in Python?
TracebacksA traceback most directly tells you:
Unit readinessWhich target best matches the Python unit "Programming model and setup"?
Practice artifactWhich practice artifact should you produce for "Programming model and setup" before asking a tutor for help?
- 02
Control flow
- Use conditionals, loops, and boolean logic.
- Handle invalid input deliberately.
Practice: Build a grade or budget calculator with explicit validation.
Original practice checksAnswer in PeerTutor, then use the explanation or bring the miss to a tutor.
4 checked answersControl flowWhat does bool("") evaluate to in Python?
ValidationWhere should input validation happen in this app's architecture?
Unit readinessWhich target best matches the Python unit "Control flow"?
Practice artifactWhich practice artifact should you produce for "Control flow" before asking a tutor for help?
- 03
Functions and testing
- Design function signatures and return values.
- Write tests for normal and edge cases.
Practice: Refactor a script into pure functions with a small test file.
Original practice checksAnswer in PeerTutor, then use the explanation or bring the miss to a tutor.
4 checked answersFunctionsWhat does a pure function return for the same inputs every time?
TestingWhich is the strongest edge case for a list-summing function?
Unit readinessWhich target best matches the Python unit "Functions and testing"?
Practice artifactWhich practice artifact should you produce for "Functions and testing" before asking a tutor for help?
- 04
Collections
- Use lists, dictionaries, sets, tuples, and comprehensions.
- Choose structures based on access patterns.
Practice: Parse a roster and compute summaries from dictionaries and lists.
Original practice checksAnswer in PeerTutor, then use the explanation or bring the miss to a tutor.
4 checked answersDictionariesWhat is the value of {'a': 2}.get('b', 5)?
Data structuresWhich structure best represents unique enrolled student ids?
Unit readinessWhich target best matches the Python unit "Collections"?
Practice artifactWhich practice artifact should you produce for "Collections" before asking a tutor for help?
- 05
Algorithms and complexity
- Implement searching, sorting, and recursion basics.
- Reason about runtime at a high level.
Practice: Compare two solutions on correctness and operation counts.
Original practice checksAnswer in PeerTutor, then use the explanation or bring the miss to a tutor.
4 checked answersComplexityWhat is the typical Big-O lookup time for a Python dict by key?
SearchBinary search requires the input to be:
Unit readinessWhich target best matches the Python unit "Algorithms and complexity"?
Practice artifactWhich practice artifact should you produce for "Algorithms and complexity" before asking a tutor for help?
- 06
Files, modules, and errors
- Read/write files and organize code into modules.
- Use exceptions at boundaries.
Practice: Build a CSV importer that returns clean data or explicit errors.
Original practice checksAnswer in PeerTutor, then use the explanation or bring the miss to a tutor.
4 checked answersFilesWhich mode opens a file for reading text in Python?
ExceptionsExceptions should be used primarily at:
Unit readinessWhich target best matches the Python unit "Files, modules, and errors"?
Practice artifactWhich practice artifact should you produce for "Files, modules, and errors" before asking a tutor for help?
- 07
Objects and state
- Use classes when state and behavior belong together.
- Avoid accidental mutation.
Practice: Model a small deterministic game or scheduler with state transitions.
Original practice checksAnswer in PeerTutor, then use the explanation or bring the miss to a tutor.
4 checked answersObjectsIn a class method, what conventional parameter refers to the instance?
State transitionsA deterministic game model should update state by:
Unit readinessWhich target best matches the Python unit "Objects and state"?
Practice artifactWhich practice artifact should you produce for "Objects and state" before asking a tutor for help?
- 08
Capstone
- Build a data, automation, or study-tool project.
- Document usage and tests.
Practice: Ship a small project with a README, test cases, and sample input/output.
Original practice checksAnswer in PeerTutor, then use the explanation or bring the miss to a tutor.
4 checked answersCapstoneWhat file should explain how to run and test a project?
Project readinessWhich artifact best proves a project works?
Unit readinessWhich target best matches the Python unit "Capstone"?
Practice artifactWhich practice artifact should you produce for "Capstone" before asking a tutor for help?
Source library
These are source links, not scraped course copies. Licenses differ, so the label tells students how each source is used.
View the full citation indexIntroductory Python course with lectures, notes, and problem sets.
Interactive Python textbook with active code, tracing, and chapter assessments.
Python-based computer science text adapted from CS 61A and SICP ideas.
Data science cycle, Python, statistics, modeling, visualization, and ethics.