Lesson 1 · Computational Thinking
Everyday algorithms all around us.
"Algorithm" sounds like something only engineers at Google use. It isn't.
An algorithm is a list of steps that gets you a result. That's the whole idea.
Brushing your teeth is an algorithm. Making chai is an algorithm. The method your maths teacher taught you for long division is an algorithm — a famous one, thousands of years old. You have been writing and following algorithms your entire life. You just didn't call them that.
Not every list of steps qualifies. A proper algorithm has four properties:
Miss any one of these and a computer cannot run it.
| Everyday task | The steps | The result |
|---|---|---|
| Making chai | Boil water → add tea → add milk and sugar → strain | A cup of chai |
| Long division | Divide → multiply → subtract → bring down → repeat | A quotient |
| Getting to school | Leave home → walk to stop → board bus 34 → get off at gate | You, at school |
| Finding a name in a phone book | Open the middle → too far? go back → repeat | The number |
That last one is genuinely clever, and computers use it constantly. You'll meet it again as binary search.
Which of these is NOT a valid algorithm?
Write the full algorithm for making one cup of chai — precise enough that someone who has genuinely never made it could follow along.
Check your list against all four rules:
This chapter is free — open this lesson in your portal to save your answers and track progress.
There is almost never only one correct algorithm. Two people can make chai in different orders and both get chai. Later you'll learn to ask a sharper question: which algorithm is faster, or simpler, or uses less?
To find one name in a 500-page phone book, here are two algorithms:
A: Start at page 1. Read every name until you find it. B: Open the middle. Is your name before or after? Throw away the half it isn't in. Repeat.
Both work. Explain which is better and why — then estimate roughly how many pages each one looks at in the worst case.