Welcome
This course assumes you have never written a line of code. Every term gets defined the first time it appears, starting now.
A computer is a machine that follows instructions. That is the whole trick. It is not smart, it does not understand anything, and it never gets creative. It just follows instructions extremely fast, billions of steps per second.
A program is a list of instructions written down for a computer to follow. When you open a weather app, a program runs. When a cash register scans a barcode, a program runs. Software is just the collective word for programs.
Every program, from a calculator to a video game, does three things:
- Input: it takes information in (a tap, a typed word, a file)
- Process: it follows instructions to transform that information
- Output: it produces a result (text on screen, a sound, a saved photo)
Keep this triangle in mind. Every program you write in this course will be input, process, output.
Instructions must be exact
Humans fill in gaps. If a friend says "grab me a drink", you work out the details yourself. Computers cannot do that. An instruction like "make it look nice" means nothing to a machine. Programs must spell out every single step, in order, with no ambiguity.
A program is like a recipe written for the world's most literal cook. If the recipe says "add salt" but never says how much, the literal cook stops or does something absurd. When a program's instructions are wrong or incomplete, the program misbehaves. Programmers call that a bug, and fixing it is called debugging.
To write instructions a computer can follow, we use a programming language: a small, strict vocabulary with exact rules. In this course you will use Python, one of the most popular and beginner-friendly programming languages in the world. Text written in a programming language is called code.
Quiz
A calculator app: you type 8 × 7 and the screen shows 56. Which part is the process step?
Problem
A programmer's music app takes the song title you tap and then plays the sound through the speaker. The tap is the input and the sound is the output. What is the one-word name for the middle step, where the program's instructions transform input into output?