What Is an Algorithm?
Introduction
Imagine you have a treasure map, a recipe for chocolate chip cookies, or a set of dance moves. All of these are Step‑by‑step Plans that tell you exactly what to do and in what order. In computer science, a step‑by‑step plan is called an Algorithm. It’s a list of instructions that a computer (or a person) follows to solve a problem or finish a task.
1. How Algorithms Work: The Power of Order
- Sequential – The Latin word sequential means “one after another.” An algorithm works Sequentially, so the computer does the first step, then the second, then the third, and so on.
- Cause And Effect – Each step causes the next step to happen. If you forget a step, the result can be wrong—just like leaving out sugar makes a cookie taste bland.
Example:
Algorithm to make a paper airplane
- Fold the paper in half lengthwise.
- Unfold it and fold the top corners toward the middle line.
- Fold the new triangle’s tip down to meet the bottom edge.
- Fold the outer corners to the center line again.
- Fold the plane in half away from you.
- Create the wings by folding each side down.
Follow the steps in order, and you’ll have a soaring airplane!
2. Everyday Algorithms Around You
| Everyday Activity | Hidden Algorithm |
|---|---|
| Brushing teeth | 1️⃣ Wet brush → 2️⃣ Add toothpaste → 3️⃣ Scrub → 4️⃣ Rinse |
| Getting dressed | 1️⃣ Choose clothes → 2️⃣ Put on underwear → 3️⃣ Shirt → 4️⃣ Pants → 5️⃣ Shoes |
| Solving a math problem | 1️⃣ Read the question → 2️⃣ Identify numbers → 3️⃣ Choose the right formula → 4️⃣ Compute → 5️⃣ Check answer |
Notice how each activity follows a Predictable Pattern? That pattern is the algorithm.
3. Did You Know?
-
The word Algorithm comes from the name of a Persian mathematician, Al‑khwārizmī, who lived over 1,200 years ago! He wrote about systematic ways to solve equations, and his name became the word we use today.
-
Computers can run Millions of algorithms every second—far faster than any human can follow a recipe!
4. Mini Experiment: Become A Human Computer
What You Need:
- A friend or sibling
- A small stack of index cards (5‑10) with simple tasks written on them (e.g., “draw a circle,” “clap three times,” “say your favorite animal”).
Steps:
- Write The Algorithm – On a piece of paper, list the tasks in the exact order you want them performed.
- Give The List to your friend Without Showing The Cards.
- Ask Your Friend to act out the algorithm by picking the correct card each time.
- Observe what happens if a step is skipped or done out of order.
What You’ll Learn:
- The importance of Precision (being exact).
- How a single mistake can change the whole outcome—just like a typo can crash a computer program.
Quick Quiz
- True Or False: An algorithm must always be written in computer code.
- What does the word sequential mean?
- If you forget step 3 in the paper‑airplane algorithm, will the plane still fly? Why or why not?
Answers: 1️⃣ False – you can write an algorithm on paper or speak it aloud. 2️⃣ One‑after‑another. 3️⃣ It might still fly, but it will be wobbly because the
…because the wing shape will be off, making it unstable.
That’s all for now—keep spotting algorithms in everyday life and you’ll become a coding detective!