Computer Science › Foundations of Computer Science

Programming & Computational Thinking

0 of 23
  1. Problem Decomposition and Algorithmic Thinking

    Breaking a problem into an ordered sequence of unambiguous steps before writing a single line of real code, using a toy grid-world/robot example to separate algorithmic thinking from syntax.

    Read →6 sections12 min
  2. Variables and Primitive Types

    Naming a piece of memory to hold a value, and the primitive types (int, float, bool, str) every program is built from.

    Read →6 sections12 min
  3. Floating-Point and Approximation

    Why floating-point numbers are an approximation of the reals, not the reals themselves, and what that means for equality checks and accumulated error.

    Read →6 sections11 min
  4. Expressions and Assignment

    Combining values and operators into expressions, and the difference between mathematical equality and assignment's 'store the result here'.

    Read →6 sections11 min
  5. Conditional Control Flow

    Branching a program's execution with if/elif/else based on a boolean condition.

    Read →6 sections12 min
  6. Iteration and Loops

    Repeating a block of code with while and for, and the loop invariants that keep a repeated computation correct.

    Read →6 sections12 min
  7. Timing and Counting Operations

    Measuring how a program's actual running time grows as its input grows, by timing it and by counting its operations.

    Read →6 sections10 min
  8. Big-O and Asymptotic Complexity

    Describing an algorithm's growth rate independent of any specific machine, using Big-O to bound its worst case.

    Read →6 sections12 min
  9. Lists and Mutability

    Storing an ordered, growable sequence of values in a list, and the difference between a mutable list and an immutable value like a number or string.

    Read →6 sections11 min
  10. Sorting Algorithms: An Introduction

    A first pass at sorting: comparing simple quadratic sorts (bubble/selection/insertion) against a divide-and-conquer sort (merge sort), and why the comparison matters once Big-O is on the table.

    Read →6 sections12 min
  11. Dictionaries

    Storing key-value pairs for near-constant-time lookup by key instead of by position, backed by a hash table.

    Read →6 sections14 min
  12. Tuples

    An immutable, fixed-size sequence — when to reach for a tuple instead of a list, and how tuple unpacking reads cleaner than manual indexing.

    Read →6 sections12 min
  13. Aliasing and Cloning

    Two variables can point at the same mutable list in memory — mutating through one changes what the other sees, unless you clone instead of alias.

    Read →6 sections13 min
  14. Decomposition and Abstraction via Functions

    Wrapping a block of logic behind a name so a caller can use it without knowing how it works inside — the mechanism behind computational thinking's abstraction pillar.

    Read →6 sections12 min
  15. Recursion

    A function that solves a problem by calling itself on a smaller version of the same problem, bottoming out at a base case.

    Read →6 sections16 min
  16. Recursion on Structural Data

    Applying recursion to a value's shape — walking a nested list or a string letter-by-letter — rather than to a shrinking number.

    Read →6 sections12 min
  17. Testing and Debugging

    Writing test cases before you trust a function, and a systematic process for isolating a bug instead of guessing at print statements.

    Read →6 sections14 min
  18. Exceptions and Assertions

    Raising and catching exceptions for conditions a caller must handle, and assertions for conditions that should never happen at all.

    Read →6 sections14 min
  19. Parameters and Return Values

    Passing data into a function and getting a result back out — parameter binding, default values, and what a function returns when it doesn't say.

    Read →6 sections12 min
  20. Functions as First-Class Objects

    Treating a function itself as a value — assigning it to a variable, passing it as an argument, or writing one inline as a lambda.

    Read →6 sections11 min
  21. Guess-and-Check and Bisection Search

    Solving equations no closed form covers by successive approximation — exhaustive guess-and-check first, then bisection search cutting the search space in half each step.

    Read →6 sections13 min
  22. Input and Output

    Reading a value from the user and printing a result back — the smallest possible feedback loop a program can have.

    Read →6 sections10 min

Programming & Computational Thinking

Part of the Computer Science curriculum.

Sort
1

What Is Computation

The four pillars of computational thinking — decomposition, pattern recognition, abstraction, and algorithm design — and why they're a way of thinking, not a way of coding.

2

Problem Decomposition and Algorithmic Thinking

Breaking a problem into an ordered sequence of unambiguous steps before writing a single line of real code, using a toy grid-world/robot example to separate algorithmic thinking from syntax.

3

Variables and Primitive Types

Naming a piece of memory to hold a value, and the primitive types (int, float, bool, str) every program is built from.

4

Floating-Point and Approximation

Why floating-point numbers are an approximation of the reals, not the reals themselves, and what that means for equality checks and accumulated error.

5

Expressions and Assignment

Combining values and operators into expressions, and the difference between mathematical equality and assignment's 'store the result here'.

6

Conditional Control Flow

Branching a program's execution with if/elif/else based on a boolean condition.

7

Iteration and Loops

Repeating a block of code with while and for, and the loop invariants that keep a repeated computation correct.

8

Timing and Counting Operations

Measuring how a program's actual running time grows as its input grows, by timing it and by counting its operations.

9

Big-O and Asymptotic Complexity

Describing an algorithm's growth rate independent of any specific machine, using Big-O to bound its worst case.

10

Lists and Mutability

Storing an ordered, growable sequence of values in a list, and the difference between a mutable list and an immutable value like a number or string.

11

Sorting Algorithms: An Introduction

A first pass at sorting: comparing simple quadratic sorts (bubble/selection/insertion) against a divide-and-conquer sort (merge sort), and why the comparison matters once Big-O is on the table.

12

Dictionaries

Storing key-value pairs for near-constant-time lookup by key instead of by position, backed by a hash table.

13

Tuples

An immutable, fixed-size sequence — when to reach for a tuple instead of a list, and how tuple unpacking reads cleaner than manual indexing.

14

Aliasing and Cloning

Two variables can point at the same mutable list in memory — mutating through one changes what the other sees, unless you clone instead of alias.

15

Decomposition and Abstraction via Functions

Wrapping a block of logic behind a name so a caller can use it without knowing how it works inside — the mechanism behind computational thinking's abstraction pillar.

16

Recursion

A function that solves a problem by calling itself on a smaller version of the same problem, bottoming out at a base case.

17

Recursion on Structural Data

Applying recursion to a value's shape — walking a nested list or a string letter-by-letter — rather than to a shrinking number.

18

Testing and Debugging

Writing test cases before you trust a function, and a systematic process for isolating a bug instead of guessing at print statements.

19

Exceptions and Assertions

Raising and catching exceptions for conditions a caller must handle, and assertions for conditions that should never happen at all.

20

Parameters and Return Values

Passing data into a function and getting a result back out — parameter binding, default values, and what a function returns when it doesn't say.

21

Functions as First-Class Objects

Treating a function itself as a value — assigning it to a variable, passing it as an argument, or writing one inline as a lambda.

22

Guess-and-Check and Bisection Search

Solving equations no closed form covers by successive approximation — exhaustive guess-and-check first, then bisection search cutting the search space in half each step.

23

Input and Output

Reading a value from the user and printing a result back — the smallest possible feedback loop a program can have.