Programming — AQA GCSE Computer Science
Test yourself on Programming with AQA GCSE practice questions.
7 days Premium · Then free forever · No card, no charge
Your focus
- Exam questions will explicitly state in what form the response needs to be provided. This will be, for example, pseudo-code, program code or a flowchart, and students must respond as instructed. Where pseudo-code is an accepted method of response, students may present their answers to questions in any suitable format and do not need to use the AQA pseudo-code.
Programming exam tips
Quick Revision Summary (Key Takeaway)
Programming in AQA GCSE Computer Science assesses your ability to design, write, and trace algorithms using sequence, selection, iteration, and structured data handling. Mastering foundational constructs, data types, and subroutines is vital for securing top marks in Paper 1.
Topic Overview
The Programming component of AQA GCSE Computer Science develops practical and conceptual skills in translating logical solutions into functional code. It covers fundamental control structures including sequence, selection, and definite and indefinite iteration, alongside data types, data structures, and string handling.
Understanding programming is essential because it bridges theoretical algorithmic design and tangible software implementation. It accounts for a substantial proportion of Paper 1 assessment marks, testing your ability to write, trace, debug, and refine algorithms using high-level programming languages.
Key Concepts
- →The three basic programming constructs: sequence (linear execution), selection (branching with IF-ELSE), and iteration (looping via FOR and WHILE).
- →Data types and data structures: integers, reals/floats, booleans, characters, strings, and one-dimensional/two-dimensional arrays or lists.
- →Subroutines (functions and procedures): modular code design, passing arguments by value/reference, and returning values.
- →String manipulation: slicing, length calculation (LEN), concatenation, and conversion to uppercase or lowercase.
- →Defensive programming: input validation, sanitisation, error handling, and robust algorithm construction.
Examiner Tips
- 💡Trace tables are your best friend: Always write down variable values step-by-step when tracing algorithms to avoid mental arithmetic slips.
- 💡Use meaningful variable names: When writing freehand pseudocode or Python, descriptive identifiers such as 'totalScore' or 'userAge' reduce errors and make logic clear to the marker.
- 💡Read the question instructions on language choice: AQA permits pseudocode or an allowed high-level language (like Python or C#). Stick rigidly to consistent syntax.
Common Mistakes
- Thinking arrays start at index 1: In almost all GCSE programming contexts and languages, indices are zero-based (index 0 represents the first element).
- Mixing up functions and procedures: Both are subroutines, but a function always returns a value to the calling environment, whereas a procedure performs a task without returning a value.
- Confusing indefinite and definite iteration: FOR loops are used when the number of iterations is known prior to execution, whereas WHILE loops run dynamically based on a boolean condition.
Revision Plan
- 1Week 1 (Days 1-3): Review fundamental data types, casting, sequence, and conditional statements (IF, ELIF, ELSE) with concise coding drills.
- 2Week 1 (Days 4-7): Practice definite (FOR) and indefinite (WHILE) loops, dry-running each algorithm with detailed trace tables.
- 3Week 2 (Days 1-4): Focus on 1D/2D arrays, string operations, and writing custom subroutines (functions returning values vs procedures).
- 4Week 2 (Days 5-7): Solve past Paper 1 coding questions under timed exam conditions and mark them against official AQA mark schemes.
Exam Question Types
- 📋Code Completion / Bug Fixing: Adding missing lines to pseudocode or identifying syntax and logic errors in provided code.
- 📋Trace Table Questions: Stepping through an unfamiliar algorithm with dry-run values to complete a grid showing variable states at each iteration.
- 📋Free-response Algorithm Writing: Designing a complete program or subroutine from a natural language specification (typically 6-9 marks).
Command Word Expectations (AQA)
Produce syntactically valid code or pseudocode fulfilling all requirements in the specification, including variable declarations, correct logic, and output statements.
Provide a brief, direct fact or value without explanation (e.g. stating the output of a specific subroutine call).
Set out the cause and effect or reasoning behind a programming decision (e.g. why a WHILE loop is more suitable than a FOR loop in a specific context).
How Students Lose Marks (Examiner Pitfalls)
Step-by-Step Worked Solutions
Question: A program is required to ask the user to input test scores between 0 and 100 inclusive until -1 is entered. It should output the total count of valid scores entered. Write an algorithm in pseudocode or Python.
- 1.Step 1: Initialize a counter variable 'count' to 0 to keep track of valid inputs.
- 2.Step 2: Get initial user input before entering a 'WHILE' loop, or use a sentinel-controlled while loop condition.
- 3.Step 3: Inside the loop, check if score >= 0 AND score <= 100; if valid, increment count by 1.
- 4.Step 4: Prompt for the next score inside the loop until -1 is entered.
- 5.Step 5: Output the final value of count once the loop terminates.
Question: An array named 'temps' contains 7 floating-point values representing daily temperatures. Write an algorithm to calculate and output the average temperature.
- 1.Step 1: Declare a variable 'total' and initialize it to 0.0.
- 2.Step 2: Use a definite loop (FOR loop) iterating through indices 0 to 6 (length of array - 1).
- 3.Step 3: Accumulate each array element into 'total'.
- 4.Step 4: Divide 'total' by 7 to determine the mean.
- 5.Step 5: Output the calculated average.