Think about a microwave. You put in a cold bowl of soup and press some buttons — that's what goes in. The microwave then buzzes away, firing invisible waves at the soup to warm it up — that's the bit in the middle. A minute later out comes a steaming hot bowl — that's what comes out.
Almost every machine and every computer program works in exactly these three parts. We give them tidy names:
This is called the IPO model — Input, Process, Output. Once you spot the pattern, you'll start seeing it absolutely everywhere.
The neatest way to draw the IPO model is three boxes in a row, with arrows showing which way
the information flows: in at the left, out at the right, and
the all-important process doing the work in the middle. Here it is for a
calculator working out
The numbers
Once you know the three boxes, you can describe almost anything with them. Have a look at these:
| Machine / program | Input | Process | Output |
|---|---|---|---|
| Microwave | Cold food + buttons | Heat it up | Hot food |
| Calculator | Two numbers | Add them | The answer |
| Video game | Button presses | Update the world | New picture on screen |
| Vending machine | Coins + choice | Check money, pick item | A snack (and change) |
| Search engine | Words you type | Look through pages | A list of results |
| Your brain in a spelling test | A spoken word | Remember the letters | The written word |
Notice the input and output are usually easy to name — you can see them. The clever bit, the process, is often hidden away inside.
Yes — and it does the whole loop dozens of times every second! Each tiny slice of time it reads your controller (input), works out where everything should move and whether you scored (process), then draws a fresh picture on the screen (output). Do that 60 times a second and it looks like smooth, living motion. A game is really just the IPO model running round and round, very fast.
Here's a tiny program that turns a temperature in Celsius into Fahrenheit. Real programs usually ask you for the input, but our little code sandbox can't ask questions — so we just set the input in a variable at the top. Follow the three parts as you read, then press Run:
Change the
Machines love to be chained together, and the trick is that one machine's output is the next machine's input. Think of making toast for breakfast:
Programs do this all the time. A weather app takes a location in and outputs a temperature; that temperature becomes the input to another part that outputs "wear a coat!" A big system is often just lots of little IPO boxes, each one feeding the next — like a relay race passing a baton.
It's easy to talk only about what goes in and what comes out, and forget the process in the middle — but the process is the whole point! It's where the actual work and cleverness live. "Numbers in, answer out" tells you nothing; "numbers in, add them, answer out" tells you what the machine really does. When you describe any system with IPO, always name the process, not just the input and output. And remember: the same input with a different process gives a completely different output.