GCSE Computer Science · Data types, variables, constructs, operators, strings, arrays, subroutines and random numbers
Programming fundamentals
GCSE · AQA · OCR
Programming fundamentals
Data types, variables, constructs, operators, strings, arrays, subroutines and random numbers
Study Simplified revision slides
In this deck
Exam boardsAQAOCR
Both: Same core concepts. AQA writes pseudo-code in AQA pseudo-code; OCR uses the OCR Exam Reference Language. Integer division operators: AQA uses DIV and MOD; OCR uses DIV and MOD too (plus ^ for exponent).
Tip: press T or tap Test me to hide the answers and quiz yourself.
Have a go first
Which data type should store a person's age in whole years?
Integer. Age in whole years is a whole number.
Guessing is fine. Trying before you revise helps it stick.
Key facts
Integer
A whole number data type, e.g. 42
Real / float
A number with a decimal part, e.g. 3.14
Boolean
A data type with only two values: True or False
Character
A single letter, digit or symbol, e.g. 'A'
Key facts
String
A sequence of characters, e.g. "Hello"
Variable
A named memory location whose value can change while the program runs
Constant
A named value that cannot change while the program runs
Assignment
Giving a value to a variable, e.g. score ← 0
Key facts
Sequence
Instructions carried out one after another in order
Selection
Choosing which code to run based on a condition, e.g. IF ... THEN ... ELSE
Iteration
Repeating code, e.g. FOR, WHILE, REPEAT UNTIL loops
Definite (count-controlled) iteration
A loop that repeats a set number of times, e.g. FOR i ← 1 TO 10
Key facts
Indefinite (condition-controlled) iteration
A loop that repeats until a condition is met, e.g. WHILE or REPEAT UNTIL
Nested structure
One construct inside another, e.g. an IF inside a loop
DIV
Integer division: the whole-number part of a division, e.g. 17 DIV 5 = 3
MOD
The remainder after integer division, e.g. 17 MOD 5 = 2
Key facts
Boolean operators
AND, OR, NOT
Array
A data structure holding multiple items of the same data type under one name, accessed by index
Two-dimensional array
An array of arrays, like a table with rows and columns
Record
A data structure that stores related fields of different data types
Key facts
Concatenation
Joining strings together, e.g. "Study" + "Simplified"
Substring
Part of a string
Casting
Converting a value from one data type to another, e.g. string to integer
Subroutine
A named block of code that can be called from elsewhere in a program
Key facts
Function
A subroutine that returns a value
Procedure
A subroutine that does not return a value
Parameter
A value passed into a subroutine
Local variable
A variable that only exists inside the subroutine where it is declared
Key facts
Global variable
A variable that can be accessed anywhere in the program
Key terms
- Integer
- A whole number data type, e.g. 42
- Real / float
- A number with a decimal part, e.g. 3.14
- Boolean
- A data type with only two values: True or False
- Character
- A single letter, digit or symbol, e.g. 'A'
- String
- A sequence of characters, e.g. "Hello"
- Variable
- A named memory location whose value can change while the program runs
Quick check 1
Which data type should store whether a light is on or off?
Boolean. Only two values are needed.
Quick check 2
Which data type should store a phone number like 07700900123?
String. It has a leading zero and is not used for arithmetic.
Now test yourself
Next deck: Robust programs, testing, languages and translators
studysimplified.co.uk
Teaching? Open in present mode. Swipe, use the arrow keys or tap the arrows. Download PDF opens your print window: choose "Save as PDF".
Programming fundamentals: key facts
Everything on the slides, as a list you can read or print.
- Integer
- A whole number data type, e.g. 42
- Real / float
- A number with a decimal part, e.g. 3.14
- Boolean
- A data type with only two values: True or False
- Character
- A single letter, digit or symbol, e.g. 'A'
- String
- A sequence of characters, e.g. "Hello"
- Variable
- A named memory location whose value can change while the program runs
- Constant
- A named value that cannot change while the program runs
- Assignment
- Giving a value to a variable, e.g. score ← 0
- Sequence
- Instructions carried out one after another in order
- Selection
- Choosing which code to run based on a condition, e.g. IF ... THEN ... ELSE
- Iteration
- Repeating code, e.g. FOR, WHILE, REPEAT UNTIL loops
- Definite (count-controlled) iteration
- A loop that repeats a set number of times, e.g. FOR i ← 1 TO 10
- Indefinite (condition-controlled) iteration
- A loop that repeats until a condition is met, e.g. WHILE or REPEAT UNTIL
- Nested structure
- One construct inside another, e.g. an IF inside a loop
- DIV
- Integer division: the whole-number part of a division, e.g. 17 DIV 5 = 3
- MOD
- The remainder after integer division, e.g. 17 MOD 5 = 2
- Boolean operators
- AND, OR, NOT
- Array
- A data structure holding multiple items of the same data type under one name, accessed by index
- Two-dimensional array
- An array of arrays, like a table with rows and columns
- Record
- A data structure that stores related fields of different data types
- Concatenation
- Joining strings together, e.g. "Study" + "Simplified"
- Substring
- Part of a string
- Casting
- Converting a value from one data type to another, e.g. string to integer
- Subroutine
- A named block of code that can be called from elsewhere in a program
- Function
- A subroutine that returns a value
- Procedure
- A subroutine that does not return a value
- Parameter
- A value passed into a subroutine
- Local variable
- A variable that only exists inside the subroutine where it is declared
- Global variable
- A variable that can be accessed anywhere in the program
✓ Written by Study Simplified to the AQA · OCR GCSE Computer Science specification, and independently fact-checked against the official specification. Last reviewed 1 December 2026.
Study Simplified