Input-Output Machines
📋 What it is
A function is a machine: one input goes in, exactly one output comes out, by a fixed rule.
🗣️ Coach says
A function is like a vending machine with a rule. Put in an input, get exactly one output. "×3" turns 2 into 6 and 5 into 15. The key idea: one input, one output — no surprises.
🧠 Memory hook
One input → exactly ONE output. Same input always gives the same result.
😂 Giggle
Why was the function such a good worker?
Because it always produced an output for every input!
😲 Whoa!
Every app on your phone is millions of functions — each button press is an input that returns exactly one output.
✅ Quick check: A "×3" machine gets the input 4. What comes out?
Say your answer out loud first — then reveal.
12 — the rule ×3 turns 4 into 12.
A function applies its fixed rule to the input to make the output.
🧪 Try it! (2 minutes)
Invent a rule machine ("add 5"). Feed it 3 numbers and record each output.