How to use this Do not read this book. Work with it. Keep a coding environment open alongside each chapter. Each exercise is one small step — complete it before moving to the next. Resist the urge to look ahead. The struggle is the lesson.
0 Getting Started

Set up your coding environment and write your first Python program.

  1. Getting Started interactive ▶ Colab
  2. Finding Square Roots interactive ▶ Slides
I Math Foundations

Build number intuition before writing a single line of code.

  1. Learning to Count interactive
  2. Logarithms interactive
II Programming Fundamentals

Invent the core constructs of Python from first principles.

  1. Expressions & Functions notebook ▶ Colab
  2. If-Else notebook ▶ Colab
  3. Loops and Arrays notebook ▶ Colab
  4. Recursion notebook ▶ Colab
  5. Dictionaries notebook ▶ Colab
  6. Classes & Objects notebook ▶ Colab
III Algorithms

Discover the classic algorithms that every engineer should understand deeply.

  1. Big O & Complexity interactive ▶ Colab
  2. Sorting notebook ▶ Colab
  3. Binary Search & Approximations notebook ▶ Colab
  4. Trees & Heaps notebook ▶ Colab
  5. Pattern Matching notebook ▶ Colab
  6. Backtracking notebook ▶ Colab
IV Machine Learning

Reinvent ML algorithms from scratch — no black boxes, no magic.

  1. Line Fitting & Curve Fitting interactive ▶ Slides
  2. The Encoder-Decoder Pipeline notebook ▶ Colab
  3. The Ancient Secrets of Prediction notebook ▶ Colab
  4. Regression Losses interactive ▶ Colab
  5. Linear Regression & Gradient Descent notebook ▶ Slides ▶ Colab
  6. Decision Trees notebook ▶ Colab
  7. Naive Bayes interactive
  8. Random Forests notebook ▶ Colab
  9. Classification Metrics interactive ▶ Slides
  10. K-Means Clustering interactive
  11. Recommender Systems notebook ▶ Colab
  12. Neural Networks notebook ▶ Colab
  13. Convolutions notebook ▶ Colab
  14. Information Theory & Compression notebook ▶ Colab
V Agentic AI

Build systems that learn, act, and reason autonomously.

  1. Reinforcement Learning interactive
  2. RAG & Agentic AI interactive ▶ Colab
VI Projects & Practice

Apply everything — open-ended problems with no answer key.

  1. Capstone Projects open-ended
  2. Practice Problems drills