Algorithms, Iteration & Simulation

Before a program can make a decision, it needs a way to ask a yes-or-no question. The answer to such a question is a Boolean value: exactly one of True or False. Every loop that stops, every if that fires, and every search that succeeds rests on Boolean logic.

8 lessons, each with runnable code in the browser.

  1. Boolean Logic and Relational Operators
  2. Conditionals: if / elif / else
  3. Nested Conditionals
  4. While Loops: Repeat Until Done
  5. For Loops and List Traversal
  6. Linear Search
  7. Binary Search
  8. Simulation, Efficiency, and the Limits of Computing

Compilearn home