Exam code:8525
-
When designing algorithms there are two main tools that can be used to describe them:
-
Pseudocode
-
Flowcharts
-
Examiner Tips and Tricks
Remember, in the exam you will be expected to create, interpret, correct and refine algorithms in either flowcharts or AQA pseudocode
Systemic Approach
What is a systematic approach to problem solving?
-
A systematic approach means being able to take a logical approach and use algorithmic thinking to solve a problem
-
Some examples of systematic approaches include:
-
Solving a word search puzzle
-
Finding an item within a list
-
-
A good example of a systematic approach would be a program used to find a username and the matching password in a 2D list
-
In the example below, the 2D list has column 0 which stores the username and column 1 which stores the password
|
|
[0] |
[1] |
|---|---|---|
|
[0] |
Dave |
Un1corn$ |
|
[1] |
George |
B@tman#1 |
|
[2] |
Elizabeth |
Coffee!! |
|
[3] |
Henry |
Walking&123 |
-
To iterate through the list, an algorithm would have to take a systematic approach to look for the username entered by the user and then look in the column to the immediate right to find the password for that user
|
Python code |
|---|
|
Pseudocode
What is pseudocode?
-
Pseudocode is a text based tool that uses short English words/statements to describe an algorithm
-
Pseudocode is more structured than writing sentences in English, but is very flexible
Example
-
A casino would like a program that asks users to enter an age, if they are 18 or over they can enter the site, if not then they are given a suitable message
|
Pseudocode |
|---|
|
-
The casino would like the algorithm refined so that the user also enter their first name and this is used to greet the user when they access the site
|
|
|---|
|
What are the AQA pseudocode rules?
-
AQA use a standard style for pseudocode which has been around for many years and that is seen in AQA based exams to describe algorithms
-
Pseudocode has no official syntax so to keep exams consistent AQA have stuck with a common and well-used format
Examples
|
Function |
AQA Pseudocode |
|---|---|
|
OUTPUT |
|
|
INPUT |
|
|
SELECTION |
|
|
FOR LOOPS |
|
|
WHILE LOOPS |
|
Examiner Tips and Tricks
AQA have a pseudocode guide (opens in a new tab) for students and teachers to use which will match the pseudocode in the exam papers.
Worked Example

Rewrite the flowchart as a pseudocode [4]
You must use Pseudocode
Answer
|
Pseudocode |
|
Program Code
-
Program code, unlike the generic pseudocode, is specific to a programming language
-
The accepted languages you can answer questions in are:
-
C#
-
Python (version 3)
-
VB.NET (opens in a new tab)
-
-
Exam questions will indicate the form of response expected, for example, pseudocode, program code or a flowchart
Worked Example
A programmer has written a C# program that asks the user to input two integers and then output which of the two integers is the largest. Complete the program by filling in the gaps using the information below. Each item in the table 3 should only be used once. [5]
|
Console.Write |
num1 |
num2 |
output |
|
else |
< |
> |
Else if |
|
string |
double |
int |
|
int num1;
________ num2;
Console.WriteLine("Enter a number: ");
num1 = int.Parse(Console.ReadLine());
Console.WriteLine("Enter another number: ");
num2 = int.Parse(Console.ReadLine());
if (num1 > num2)
{
Console.WriteLine("________is bigger.");
}
else if (num1________num2)
{
Console.WriteLine("________is bigger.");
}
________
{
Console.WriteLine("The numbers are equal.");
}
Answer
int num1;
int num2;
Console.WriteLine("Enter a number: ");
num1 = int.Parse(Console.ReadLine());
Console.WriteLine("Enter another number: ");
num2 = int.Parse(Console.ReadLine());
if (num1 > num2)
{
Console.WriteLine("num1 is bigger.");
}
else if (num1 < num2)
{
Console.WriteLine("num2 is bigger.");
}
else
{
Console.WriteLine("The numbers are equal.");
}
Flowcharts
What is a flowchart?
-
Flowcharts are a visual tool that uses shapes to represent different functions to describe an algorithm
-
Flowcharts show the data that is input and output, the processes that take place and any decisions or repetition
-
Lines are used to show the flow of control

Example
|
Flowchart |
|---|
|
<img alt=”flow-chart-1″ class=”ContentBlock_figure__vJw2q” data-nimg=”1″ decoding=”async” height=”680″ loading=”lazy” sizes=”(max-width: 320px) 320w, (max-width: 640px) 640w, (max-width: 960px) 960w, (max-width: 1280px) 1280w, 1920w” src=”https://cdn.savemyexams.com/cdn-cgi/image/f=auto,width=3840/https://cdn.savemyexams.com/uploads/2024/02/flow-chart-1.png” srcset=”https://cdn.savemyexams.com/cdn-cgi/image/f=auto,width=16/https://cdn.savemyexams.com/uploads/2024/02/flow-chart-1.png 16w, https://cdn.savemyexams.com/cdn-cgi/image/f=auto,width=32/https://cdn.savemyexams.com/uploads/2024/02/flow-chart-1.png 32w, https://cdn.savemyexams.com/cdn-cgi/image/f=auto,width=48/https://cdn.savemyexams.com/uploads/2024/02/flow-chart-1.png 48w, https://cdn.savemyexams.com/cdn-cgi/image/f=auto,width=64/https://cdn.savemyexams.com/uploads/2024/02/flow-chart-1.png 64w, https://cdn.savemyexams.com/cdn-cgi/image/f=auto,width=96/https://cdn.savemyexams.com/uploads/2024/02/flow-chart-1.png 96w, https://cdn.savemyexams.com/cdn-cgi/image/f=auto,width=128/https://cdn.savemyexams.com/uploads/2024/02/flow-chart-1.png 128w, https://cdn.savemyexams.com/cdn-cgi/image/f=auto,width=256/https://cdn.savemyexams.com/uploads/2024/02/flow-chart-1.png 256w, https://cdn.savemyexams.com/cdn-cgi/image/f=auto,width=384/https://cdn.savemyexams.com/uploads/2024/02/flow-chart-1.png 384w, https://cdn.savemyexams.com/cdn-cgi/image/f=auto,width=640/https://cdn.savemyexams.com/uploads/2024/02/flow-chart-1.png 640w, https://cdn.savemyexams.com/cdn-cgi/image/f=auto,width=750/https://cdn.savemyexams.com/uploads/2024/02/flow-chart-1.png 750w, https://cdn.savemyexams.com/cdn-cgi/image/f=auto,width=828/https://cdn.savemyexams.com/uploads/2024/02/flow-chart-1.png 828w, https://cdn.savemyexams.com/cdn-cgi/image/f=auto,width=1080/https://cdn.savemyexams.com/uploads/2024/02/flow-chart-1.p
|
Responses