Not a premium member yet? Save 100's of hours on lesson prep with a comprehensive library of GCSE Computer Science resources  including worksheets, tests, and PowerPoint presentations.
Download the complete GCSE Computer Science bundle including all teacher resources and student revision:
 200+ Computer Science/ICT resources
+ any we release in the future!  Access to all student revision notes
 OCR, AQA, Edexcel and WJEC compatible
 New 91 GCSE spec
Candidates should be able to:
 understand algorithms (written in pseudocode or as flow diagrams), explain what they do, and correct or complete them
 produce algorithms in pseudocode or flow diagrams to solve problems.
What is an algorithm and how can algorithms be represented?
An computer algorithm is a sequence of statements (instructions) that can be executed (carried out) by a computer to perform a particular task.
Pseudocode and flow diagrams are two ways to represent algorithms.
 Everyday language is not used because the statements would be too long and rely too much on how the reader interprets them.
 Formal programming languages are not used because algorithms are intended to be independent of the programming language.
What is a pseudocode algorithm?
Pseudocode algorithms use adapted everyday language. This means that the instructions are readable by a human but still look something like the statements available in many programming languages.
Pseudocode is not a strict list of commands since it is not meant to be understood by a computer. There are therefore no universal standards but pseudocode should ideally follow the following guidelines:
 Sequential instructions should be arranged on separate lines with the first instruction at the top.
 Indentation should be used with blocks of instructions that are part of control operations (such as conditional and iterative operations)
 Keywords should be in uppercase and the rest of the pseudocode should be in lower case.
 It should only be possible to interpret the pseudocode in one way
 The pseudocode must actually be computable, it must be possible for the program code equivalent of the pseudocode to be carried out by a computer.
 Descriptions/comments can be included but should be as brief as possible.
 It must be complete, with nothing is left out.
 It must have an end, so it does not continue for ever.
Pseudocode will often end with a list of all the variables used in the algorithm.
Once a programmer is happy with the pseudocode it can then be developed into a working program written in the source code of the programming language to be used. One example of how an algorithm can be used in a real world application is this BIN number checker. The algorithm here must take the number input by the user, search through entries in a database, and find the relevant information to return and be displayed on the page.
Some examples of key word operations used in pseudocode
 WHILE / ENDWHILE is an example of toptest iterative operation where the algorithm repeats a block of instructions until the condition tested at the start of the block is FALSE.
 REPEAT / UNTIL is a bottomtest iterative operation where the algorithm repeats a block of instructions until the condition tested at the end of the block is FALSE (the instructions will always be carried out at least once).
 CASE OF is a multiple decision branch based on the value of an expression.
 INPUT, READ, OBTAIN and GET are used to input data.
 OUTPUT, PRINT, DISPLAY and SHOW are used to output data.
 COMPUTE, CALCULATE, DETERMINE and = are use to carry out calculations.
 SET and INIT are used to initialise variables.
 INCREMENT is used to increment a variable.
 IF / THEN / ELSE / ENDIF is used to select different instructions based on the result of a TRUE/FALSE test.
 FOR / ENDFOR is used for repeating a block of instructions a specific number of times.
What is a flow diagram algorithm?
Flow diagram algorithms use labelled shapes to represent the instructions in the program and arrows to show the order of the instructions. Some examples of the standard shapes used in flow diagrams are shown below.
Constructing an algorithm using a flow diagram rather than pseudocode can often make it easier to follow the sequence of steps involved and make it easier to find logic errors.
What does an algorithm look like as pseudocode and as a flow diagram?
Example 1 – An algorithm to calculate the Sales Tax (VAT) of an item and then use it to work out the final price of an item.
Pseudocode Flow Diagram
This algorithm uses the sequential instructions: INPUT and OUTPUT.
Example 1 – An algorithm to calculate the Sales Tax (VAT) of an item and then use it to work out the final price of an item.
Pseudocode  Flow Diagram 

This algorithm uses the sequential instructions: INPUT and OUTPUT.

Example 2 – An algorithm to calculate weekly wages when gross pay depends on the pay rate and the number of hours worked per week. If more than 35 hours are worked, timeandahalf is paid for the extra hours.
Pseudocode  Flow Diagram 

This algorithm uses the sequential instructions: INPUT and OUTPUT and the conditional control operations IF / THEN / ELSE / ENDIF.

Example 3 – An algorithm to calculate the average price for a number of items.
Pseudocode  Flow Diagram 
This algorithm uses the sequential instructions: INPUT , SET and OUTPUT and the iterative control operation WHILE / ENDWHILE.

Why do teams of programmers need to agree standards when developing software?
When programmers work as a team then all the team members:
 need to understand each other’s code so clear commenting is important;
 must agree of a consistent format for naming variables;
 need to agree on a consistent interface and navigation system between the modules they work on;
 must agree on consistent protocols, for example when accessing network resources of data files.