Mental Model of Programs
Card 1 of 15

A Program is a List of Instructions

"A program is fundamentally a conversation in precise language—a list of instructions that execute from top to bottom."

Sequential Execution

Computers read and execute your code like you read a book: line by line, top to bottom. Each instruction completes before the next one starts.

Mental Model: Think of a program as a recipe. Each step happens in order. You can't frost a cake before you bake it.

Watch Instructions Execute

1. Turn on oven
2. Mix ingredients
3. Pour into pan
4. Bake for 30 minutes
5. Remove and cool
⏸️ Press "Execute" to start

The Translation Process

Programming is translating your thoughts into symbols the computer understands. First you think through the logic, then you express it in code syntax.

"Don't start with syntax. Start with 'What steps does this need?' Write them in plain English. Then translate to code."

Example: Making Toast

Human thought: "I want toast"

Program logic:

  1. Get bread
  2. Put bread in toaster
  3. Set timer to 2 minutes
  4. Press start
  5. Wait until timer done
  6. Remove toast

Python code: (We'll learn the syntax later—for now, see the structure)

bread = get_item("bread")
toaster.insert(bread)
toaster.set_timer(120)
toaster.start()
toaster.wait_until_done()
toast = toaster.remove()

Notice how each line does one thing. That's the key to clear thinking and clear code.

[##............................] 01/15
> [WHY_IT_MATTERS]:
Without variables, data is ephemeral. You'd have to re-type the universe every time it changes.
Cute Computer Mascot