AQA AS Computing 1.4 Algorithm Design Flashcards
Algorithm
A description, independent of any programming language, of a process that achieves some task. It is a step by step procedure for solving a problem.
Program
A description in a programming language of a process that achieves some useful result.
Sequence
Consecutive steps or groups of steps processed one after another in the order that they arise
Selection
a decision making step (If… then… else…/case)
Iteration (aka repetition)
A step, or sequence of steps that are repeated until some condition is satisfied. Repeat… Until…/ While… Do…/ For…
4 stages of algorithm design
- Identify the problem inputs
- Identify the problem outputs
- Determine the variables
- Derive an algorithm that transforms the inputs into outputs
Assignment
An operation that assigns a value into a variable (“:=” in Delphi! You might sometimes see <- or = used)
Structured English
A very restricted subset of the English language (resembling a program) E.g..
MULTIPLY hours by pay-rate to get total-pay
INPUT pay-rate
PRINT payslip
etc.
Pseudocode
Code that resembles a programming language but that uses less strict syntax to express an algorithm and is independent of any real programming language
Hand trace, desk check or dry run
a careful, step-by-step simulation on paper of how an algorithm would be executed by a computer