Iteration In Algorithms - KS3 Computer Science Revision - BBC
Maybe your like
In this guide
- Revise
- Test
Pages
- Iteration in algorithms
- Iteration in practice: Cleaning teeth
- Conditions and counters
- Representing iteration
Iteration in algorithms
An algorithmcloseA sequence of logical instructions for carrying out a task. In computing, algorithms are needed to design computer programs. is a plan, a set of step-by-step instructions to solve a problem. There are three basic building blocks (constructs) to use when designing algorithms:
- sequencing
- selection
- iteration
These building blocks help to describe solutions in a form ready for programmingcloseThe process of writing computer software..
What is iteration?
An explanation of iteration, as used in algorithms and programming
Iteration in programming means repeating steps, or instructionscloseA single action that can be performed by a computer processor., over and over again. This is often called a ‘loop’.
Algorithms consist of instructions that are carried out (performed) one after another. Sometimes an algorithm needs to repeat certain steps until told to stop or until a particular conditioncloseIn computing, this is a statement or sum that is either true or false. A computation depends on whether a condition equates to true or false. has been met.
Key factIteration is the process of repeating steps.For example, a very simple algorithm for eating breakfast cereal might consist of these steps:
- put cereal in bowl
- add milk to cereal
- spoon cereal and milk into mouth
- repeat step 3 until all cereal and milk is eaten
- rinse bowl and spoon
Why is iteration important?
Iteration allows algorithms to be simplified by stating that certain steps will repeat until told otherwise. This makes designing algorithms quicker and simpler because they don’t need to include lots of unnecessary steps.
Next pageIteration in practice: Cleaning teethMore guides on this topic
- Designing an algorithm
- Searching
- Sorting
- Sequencing
- Selection
- Logical reasoning
Related links
- Jobs that use Computer Science
- BBC Click
- BBC Technology news
- Tech Tent
- Headsqueeze
- Khan Academy
- Raspberry Pi
- Code Club Subscription
- Educational App Store Subscription
Tag » What Is Iteration In Computer Science
-
What Is Iterative? - TechTarget
-
What Is Iteration? - Definition From Techopedia
-
Iteration - Computer Science Wiki
-
What Is Iteration In Programming? - AfterAcademy
-
Iteration - Wikipedia
-
FAQ: What Is An Iteration In Computer Science? (With Examples)
-
Definition & Types Of Iteration - Teach Computer Science
-
Iteration - Isaac Computer Science
-
Iteration - Computer Science GCSE GURU
-
What Is Iteration? - Quora
-
What Is An Iteration? - Computer Hope
-
Iteration Examples In Real Life And Computer Programming
-
7. Iteration — How To Think Like A Computer Scientist
-
The Building Blocks Of Algorithms - Khan Academy