Computers are amazing machines, but they can’t think for themselves. They follow instructions step by step, exactly as we give them.
These instructions are written in a programming language, and must be clear, exact, and in the right order.
Imagine telling a robot to make a sandwich. If you say “put peanut butter,” it won’t know where, how much, or when.
You’d need to say:
An algorithm is a list of steps to solve a problem or complete a task. It’s like a recipe!
When you follow a recipe to bake a cake, that’s an algorithm. Computers use algorithms all the time.
Code is how we write these instructions for computers. The computer reads the code and follows it exactly — no skipping, no guessing.
If the code has a mistake, the computer will follow it anyway… and that’s called a bug.
To complete this lesson, you must score at least 80%. Read carefully and take your time!