← Back to Edexcel GCSE Computer Science

    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.

    1. 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 abstraction
    2. Algorithms

      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 Algorithms
    3. Truth 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 tables
    4. Binary

      An 8-bit register stores unsigned whole numbers. What is the largest denary value it can hold without overflow?

      Practise Binary
    5. Data 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 representation
    6. Data 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 compression
    7. Hardware

      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 Hardware
    8. Software

      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 Software
    9. Programming 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 languages
    10. Networks

      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 Networks
    11. Network 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 security
    12. Ethical 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 legal
    13. Cybersecurity

      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 Cybersecurity
    14. Develop 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 code
    15. Constructs

      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 Constructs
    16. Input/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/output
    17. Operators

      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 Operators
    18. Subprograms

      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.

    Start free

    A week of Premium from your first lesson · Then the free plan continues · No card, no charge