Lecture Notes
These notes are the textbook for the course. They are written to be read on their own, and they carry the reference material that the slides deliberately leave out.
PART 1
Foundations of Computation
- L1Computation, Machines and LanguagesThe first lecture teaches no syntax. It settles three questions instead: what lets a machine compute at all, what actually happens when a program runs, and why this course uses Python rather than something else.SlidesAI Level 0
- L2Characters and NumbersThere is nothing in a computer but ones and zeros. This lecture turns them back into things you recognize — letters, whole numbers, decimals — and explains why the decimals will lie to you.SlidesAI Level 0
- L3Strings, Variables and I/OPrograms have to deal with people — take something in, hand something back. This lecture also introduces functions, your first real weapon against complexity.SlidesAI Level 0
- L4Conditions, Loops and FunctionsSo far your programs run straight down the page and stop. This lecture adds the two things they have been missing — branching and repetition. With those, Python can express any computable process at all.SlidesAI Level 0
PART 2
Built-in Data Structures
- L5ListsA single variable cannot hold a real problem. Lists are the container you will reach for most often in Python, and also the one that trips up beginners most — because underneath, a list is a reference, not a value.SlidesAI Level 0
- L6Tuples, Dictionaries, Strings and SetsLists do not solve everything. This lecture fills in the other four containers, and answers the more important question — given a concrete problem, which one should you reach for.AI Level 0
PART 3
Problem Solving with AI
- L7RecursionA function can call itself. That idea sounds like a party trick, but it is the most direct route through a whole class of problems — any problem you can restate as a smaller version of itself.AI Level 0
- L8AI-Assisted Programming I: Reading, Reviewing, TrustingFrom this lecture on you may use an AI to write code. But before you press enter, you need to be able to judge whether what it gave you is right — and that judgment is what this lecture is about.AI Level 1
PART 4
Abstraction and Organization
- L9Classes I: Objects and EncapsulationA function packages a piece of logic. A class packages data together with the logic that acts on it. Once the things in your program start having their own state and behavior, it is time for classes.AI Level 1
- L10Classes II and ModulesTwo halves. The first is inheritance and polymorphism — giving classes relationships to each other. The second is modules: packing classes and functions into files, and a look at how Python actually runs your code.AI Level 1
PART 5
Robustness and the Real World
- L11Complexity, Exceptions and TestingEverything so far assumed valid input, clean data and small sizes. This lecture handles the real world, where a program can let you down in three ways: too slow, it crashes, or it is quietly wrong.AI Level 1
- L12Randomness, Text and FilesUntil now every piece of data has been written into your code. This lecture connects programs to the outside world — generating randomness, reading and writing files, handling encodings, and pulling what you need out of messy text with regular expressions.AI Level 1
PART 6
Pythonic Python and Modern Practice
- L13Iterables and GeneratorsYou have been writing for loops for twelve lectures without knowing what happens behind them. This lecture opens that up — and along the way lets you process data larger than memory.AI Level 1
- L14Functions, Functional Programming and ScopeA function is not merely a block of code you can call — it is a value you can pass around, return, and wrap. Grasp that and the Python constructs that look like magic stop looking like magic.AI Level 1
- L15AI-Assisted Programming II: From Prompt to ProjectL8 was about reviewing a function an AI wrote for you. This lecture is about how an AI participates in a whole project — and where it will reliably let you down.AI Level 2
- L16Multitasking, Review and BeyondThe last lecture. First one remaining piece of the picture — how a program does several things at once — then sixteen weeks assembled into one map, and finally where this course leads.AI Level 2