AQA GCSE Computer Science
Programming fundamentals — AQA GCSE Computer Science revision
Free revision notes, key terms, common exam traps and 5 practice questions with answers. About 7 minutes to read.
Variables, data types and operators
- A variable is a named piece of memory whose value can change while a program runs; a constant is set once and never changes, e.g. PI = 3.14.
- Common data types: integer (whole numbers), real/float (decimals), string (text), Boolean (True/False), character (single letter/symbol).
- Arithmetic operators: + - * / (division), // or DIV (integer division), MOD or % (remainder), ^ or ** (power).
- Comparison operators (== != > < >= <=) return a Boolean and are used in selection and iteration conditions.
- Logical operators AND, OR, NOT combine Boolean conditions, e.g. IF age >= 12 AND hasTicket THEN allowEntry().
Sequence, selection and iteration
- Sequence means instructions run one after another in order, exactly as written.
- Selection uses IF/ELSE IF/ELSE (or CASE/SWITCH) to choose which instructions run based on a condition.
- Count-controlled iteration (FOR loop) repeats a fixed number of times, e.g. FOR i = 1 TO 10.
- Condition-controlled iteration (WHILE loop) repeats while a condition is true, checked before each pass; REPEAT...UNTIL checks after each pass so it always runs at least once.
- Nested selection/iteration (loops or IFs inside other loops/IFs) let programs solve more complex problems, e.g. checking every item in every row of a grid.
Key terms
- Variable
- A named storage location whose value can change while a program runs.
- Constant
- A named value that is fixed and does not change during execution.
- Iteration
- Repeating a set of instructions, using FOR, WHILE or REPEAT...UNTIL loops.
- Selection
- Choosing which code runs using IF, ELSE or CASE statements.
- Array
- A data structure storing multiple values of the same type under one name, accessed by index.
- Parameter
- A value passed into a subprogram when it is called.
Common exam traps
- Confusing = (assignment) with == (comparison) — assignment stores a value, comparison checks equality.
- Forgetting arrays are usually zero-indexed, so the first element is index 0, not 1.
- Mixing up WHILE (checks before, may run 0 times) with REPEAT...UNTIL (checks after, runs at least once).
Practice questions with answers
1. What is a variable?
- • A named storage location that can change value
- • A fixed value that never changes
- • A type of loop
- • An error message
Answer: A named storage location that can change value
Variables store data that can be updated while the program runs.
2. Which loop always executes its body at least once?
- • FOR loop
- • WHILE loop
- • REPEAT...UNTIL loop
- • IF statement
Answer: REPEAT...UNTIL loop
REPEAT...UNTIL checks its condition after running the body, so it always runs once.
3. What is the index of the first element in an array?
Answer: 0
Most programming languages, including Python, index arrays starting from 0.
4. Which data type stores True or False?
- • Integer
- • Boolean
- • String
- • Real
Answer: Boolean
Boolean data type has exactly two values: True and False.
5. What does MOD (or %) return?
Answer: The remainder after division
MOD gives the remainder, e.g. 10 MOD 3 = 1.
Keep going in the app
This topic has 55 questions in total, plus flashcards, cram mode and Grade 9 Push challenges.
More free Computer Science revision
- All AQA Computer Science revision pages
- All GCSE Computer Science topics
- AQA Computer Science: Computer systems and CPU architecture
- AQA Computer Science: Memory and storage
- AQA Computer Science: Systems software and utilities
- AQA Computer Science: Networks and network topologies
- AQA Computer Science: Network and cyber security
- AQA Computer Science: Data representation: binary, hex, images and sound
- Every subject on ReviseRush
ReviseRush is an independent educational revision aid. It is not affiliated with, endorsed by or connected to AQA, Edexcel, OCR, WJEC, Pearson or any exam board. All notes and questions are original. Always check content against your official course and specification. No grade outcome is guaranteed.