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:
- Get bread
- Put bread in toaster
- Set timer to 2 minutes
- Press start
- Wait until timer done
- 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.