Pseudocode & Flowcharts (OCR GCSE Computer Science)
Revision Note
Written by: Robert Hampton
Reviewed by: James Woodhouse
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, pseudocode or OCR exam reference language
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
Pseudocode |
|
What is OCR exam reference language?
OCR exam reference language is the officially designed pseudocode that is seen in OCR based exams to describe algorithms
Pseudocode has no official syntax so to keep exams consistent OCR have developed their own
Examples
Function | OCR exam reference language |
OUTPUT |
|
INPUT |
|
SELECTION |
|
FOR LOOPS |
|
WHILE LOOPS |
|
Examiner Tips and Tricks
OCR exam reference language is so close to Python syntax that you can write algorithms in Python in both section A and B of the exam!
Worked Example
Rewrite the flowchart as a pseudocode [4]
You must use either
Pseudocode or
OCR Exam Reference Language
Answer
Pseudocode | OCR exam reference language |
---|---|
|
|
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 |
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
Flowchart |
Last updated:
You've read 0 of your 5 free revision notes this week
Sign up now. It’s free!
Did this page help you?