Full course — free exercises, Feynman reviews, and AI-graded feedback:
https://ludium.ai/courses/intro-cs-py...
Here is a quiz: write a function that adds up all the odd integers between two endpoints, inclusive. This video builds sum_odds the smart way, planning on paper before touching the keyboard, solving a simpler cousin first, and adding one nuance at a time. That discipline is exactly what surfaces the classic off-by-one bug, where range stops one short, and shows you how to fix it.
Key concepts covered:
Designing the outside of a function first: name, inputs, and output
Working examples by hand so you know the answer before you code
Solving a simpler version, then adding features one at a time
The for loop versus the while loop, and where each is easy to get wrong
The off-by-one bug: why range(A, B) stops early and why range(A, B + 1) fixes it
Filtering to odd numbers with i % 2 == 1
━━━━━━━━━━━━━━━━━━━━━━━━
SOURCE MATERIALS
The source materials for this video are from • Lecture 7: Decomposition, Abstraction, and...