โ† All Technology topics
Technology ยท Topic 3 of 118

Coding and Algorithms

An algorithm is a set of step-by-step instructions. Programmers write code so computers follow those steps.

๐Ÿ’ก Fun fact

A recipe is an everyday algorithm.

All about Coding and Algorithms

An algorithm is a set of clear, step-by-step instructions for solving a problem or completing a task. A recipe is an algorithm, and so is the method for tying shoelaces. Computers need very precise algorithms because they follow instructions exactly.

Programmers write code to turn algorithms into something a computer can run. Code is written in a programming language, using commands that are arranged in a logical order. Planning the steps before writing code makes programs easier to build.

Writing good algorithms takes practice. You need to think about each step, test whether it works and fix it when it does not. Many great programs are built from small algorithms that work together, like building a model from individual bricks.

๐ŸŽฎ Try it yourself!

Loadingโ€ฆ

๐Ÿ‘€ What the animation shows

This animation shows a character following a set of instructions one step at a time to reach a goal. Watch how each command is carried out in order, and how changing one step changes the path.

Real-life uses of Coding and Algorithms

  • Building games and apps step by step
  • Sorting lists of names or scores quickly
  • Finding the fastest route on a map app

Frequently asked questions about Coding and Algorithms

What is an algorithm in simple words?

A list of steps that solves a problem or completes a task in a clear order.

Is coding the same as programming?

Yes, coding and programming mean much the same thing, which is writing instructions for computers.

Can you do an algorithm without a computer?

Yes. Instructions for making a sandwich or sorting cards are algorithms that people follow without any computer.