Exam-style questions by topic — Edexcel GCSE Computer Science
One verified question for each of 18 topics. These are written for this specification and checked by MasteryMind. They are not past-paper questions, and they are not from Pearson Edexcel.
Decomposition and abstraction
A program contains the same 8-line input validation block copied into 15 places. A fault is found, and the whole 8-line block must be rewritten wherever it appears. How many lines must be rewritten before the block is moved into a subprogram, and how many after?
Practise Decomposition and abstractionAlgorithms
A teacher wants an algorithm to find the average of five marks, but the algorithm below uses FOR i ← 1 TO 4, so the fifth mark is not read. Which single change to the algorithm corrects this logic error? total ← 0 count ← 0 FOR i ← 1 TO 4 INPUT mark total ← total + mark count ← count + 1 NEXT i average ← total / count OUTPUT average
Practise AlgorithmsTruth tables
A pseudocode control expression is (A OR B) AND NOT C, where A, B and C are three inputs. For how many of the eight input combinations of A, B and C does this expression give an output of 1?
Practise Truth tablesBinary
An 8-bit register stores unsigned whole numbers. What is the largest denary value it can hold without overflow?
Practise BinaryData representation
Lowercase 'a' has denary code 97 in 7-bit ASCII, and the lowercase letters are stored in alphabetical order with consecutive codes. What is the 7-bit binary code for lowercase 'g'?
Practise Data representationData storage and compression
A hospital stores scanned X-ray images on a shared server. A radiologist will later measure the width of very small bone fractures from the stored images, so every pixel must match the original scan when the image is opened. Which compression approach should the hospital use, and why?
Practise Data storage and compressionHardware
During the fetch stage of the fetch-decode-execute cycle, the CPU must send the location of the next instruction to RAM. Which bus carries this location, and in which direction does it travel?
Practise HardwareSoftware
A spreadsheet stopped opening after the computer lost power while the file was being saved. The user has no other copy of the file. Which utility is most likely to recover usable data from the damaged file?
Practise SoftwareProgramming languages
An interpreter is used to run a high-level program. How does the interpreter translate the high-level code into machine code?
Practise Programming languagesNetworks
A 15 megabyte (MB) file is transmitted across a network at a speed of 5 megabits per second (Mbps). Assuming 1 megabyte = 8 megabits, how long does the transmission take?
Practise NetworksNetwork security
A company gives a tester written permission to attempt to break into its network, so that weaknesses can be found and fixed before criminals exploit them. What is this process called?
Practise Network securityEthical and legal
A programmer releases a software application under a licence that allows other people to copy and change the program, provided each user credits the original author. What does this licence show about the programmer's rights in the software?
Practise Ethical and legalCybersecurity
A school's anti-malware software is fully up to date, but staff keep becoming infected after opening unexpected email attachments from unknown senders. Which measure would most directly reduce these infections?
Practise CybersecurityDevelop code
A program should print the mean of the three values in the list numbers = [4, 8, 6]. The code is: numbers = [4, 8, 6] total = 0 for n in numbers: total = total + n average = total / 2 print(average) The program prints 9.0 instead of the correct mean. Which correction fixes the logic error?
Practise Develop codeConstructs
The pseudocode below defines a subprogram and then calls it. What is the role of x in the statement y ← Double(x)? FUNCTION Double(n) RETURN n * 2 END FUNCTION x ← 4 y ← Double(x)
Practise ConstructsInput/output
A program stores each user's ID and password as a record in a list. A user types in an ID to log in. Before any password can be checked, what must the program do with the typed ID?
Practise Input/outputOperators
A program sets total to 4. It uses WHILE total <= 20 and, inside the loop, adds 4 to total each time the statements in the loop run. How many times do the statements inside the loop run?
Practise OperatorsSubprograms
A Python program contains the following: def average(a, b): return (a + b) / 2 The program then runs x = average(4, 9) + 1. What value is stored in x?
Practise Subprograms
Practise all 150 verified questions and see your weak topics.
A week of Premium from your first lesson · Then the free plan continues · No card, no charge