Year 11 · Computer Science · Spring 2 – Summer 1

Final revision and the exams · Lesson 5 of 5

Last full Paper 2

Exam practice7.4 Standard methods of solution7.9 Writing and amending algorithms9.3 SQL: SELECT, FROM, WHERE, AND, OR

Year 11 · Computer Science · Final revision and the exams · Lesson 5 of 5

You will learn to

  • Complete a full Paper 2 in 1 hour 45 minutes, using the timing plan.
  • Correct every lost mark using the mark scheme in the corrections lesson.
  • Describe what to bring and what to do on the exam day.

Year 11 · Computer Science · Final revision and the exams · Lesson 5 of 5

Success criteria

You have got it when you can say:

  • I can start the scenario question by my planned clock time.
  • I can write a full-mark correction for every question where I lost marks.
  • I can list what goes in my pencil case and what stays outside the exam room.

Year 11 · Computer Science · Final revision and the exams · Lesson 5 of 5

Retrieval starter

Questions from before. Write your answers, then show them.

  1. Last lesson

    An expert system's rule base holds…

    A The sensorsB IF–THEN rulesC The user's name

    B. IF–THEN rules

  2. Last unit

    X = (A AND B) OR C with A = 0, B = 1, C = 1 gives…

    A 1B Cannot tellC 0

    A. 1

  3. Earlier this year

    SUBSTRING("Computer", 1, 3) gives…

    A ComputerB ComC omp

    B. Com

Year 11 · Computer Science · Final revision and the exams · Lesson 5 of 5

Key words (1 of 7)

Algorithm
A precise, ordered set of steps that solves a problem.
Program development life cycle
The four stages of making a program: analysis, design, coding and testing.
Structure diagram
A top-down diagram that shows how a system is split into sub-systems.
Pseudocode
A structured, code-like way of writing an algorithm that is not tied to one language.

Year 11 · Computer Science · Final revision and the exams · Lesson 5 of 5

Key words (2 of 7)

Totalling
Adding values into a running total, for example Total ← Total + Value.
Counting
Adding 1 to a counter each time something happens.
Linear search
Checking each item in a list in turn until the target is found or the list ends.
Bubble sort
Sorting by comparing neighbouring items and swapping them if they are in the wrong order, pass after pass.

Year 11 · Computer Science · Final revision and the exams · Lesson 5 of 5

Key words (3 of 7)

Validation
An automatic check that data is sensible and follows the rules before it is accepted.
Check digit
An extra digit calculated from the other digits, used to catch typing errors.
Trace table
A table used in a dry run to record the value of each variable as an algorithm runs.
Database
An organised, structured store of data that a computer can search and sort.

Year 11 · Computer Science · Final revision and the exams · Lesson 5 of 5

Key words (4 of 7)

Table
A grid of data made of rows (records) and columns (fields).
Field
One column of a table; it holds one item of data about every record, such as Minutes.
Record
One row of a table; it holds all the data about one thing, such as one bike hire.
Field name
The heading at the top of a column, such as HireID; it is not a record.

Year 11 · Computer Science · Final revision and the exams · Lesson 5 of 5

Key words (5 of 7)

Data type
The kind of data a field can hold, such as integer, real or Boolean.
Text / alphanumeric
A data type for letters, digits and symbols, such as a name or a phone number.
Boolean
A data type with only two possible values, TRUE or FALSE.
Integer
A data type for whole numbers, such as 55.

Year 11 · Computer Science · Final revision and the exams · Lesson 5 of 5

Key words (6 of 7)

Real
A data type for numbers with a decimal part, such as 5.50.
Date/time
A data type for a date, a time, or both, such as 05/03/2026.
SQL
Structured Query Language: the language used to ask a database for data.
Query
A question to the database, written in SQL, that returns matching data.

Year 11 · Computer Science · Final revision and the exams · Lesson 5 of 5

Key words (7 of 7)

ORDER BY
The SQL clause that sorts the output, ascending (ASC) or descending (DESC).
COUNT
An SQL function that counts how many records meet a condition.

The explanation · step 1 of 16 · part 1 of 2

The day before

Check the date, the time and the room of each paper.

  • Two black or dark blue pens.
  • A pencil, a ruler and an eraser for diagrams and logic circuits.
  • A simple watch. Smartwatches are not allowed.
  • No calculator. It is not allowed in either Computer Science paper.

The explanation · step 1 of 16 · part 2 of 2

The day before (continued)

★Remember

Sleep is part of revision. A tired brain recalls less. Stop revising early and go to bed.

The explanation · step 2 of 16 · part 1 of 2

In the exam room

  1. Read the instructions on the front cover.
  2. Write your clock times for the paper on the front page.
  3. For each question: underline the command word and circle the marks.
  4. Answer every question. A blank always scores zero.
  5. In the last 10 minutes, check: working, units, trace tables, and starred questions.

The explanation · step 2 of 16 · part 2 of 2

In the exam room (continued)

!Watch out

Phones and smartwatches must be handed in before you enter the room. Having one on you can lead to disqualification.

7.4 Standard methods of solution · The explanation · step 3 of 16 · part 1 of 5

Totalling and counting

Totalling means adding values into a running total: `Total ← Total + Value`.

Counting means adding 1 each time something happens: `Count ← Count + 1`.

Both variables must start at 0 before the loop.

7.4 Standard methods of solution · The explanation · step 3 of 16 · part 2 of 5

Totalling and counting (continued)

e.g.Example
Marks 34, 48, 21, 40, 15, 45. Pass mark 25. Total: 0 → 34 → 82 → 103 → 143 → 158 → 203 PassCount: 34 yes (1), 48 yes (2), 21 no, 40 yes (3), 15 no, 45 yes (4) Output: Total: 203, Number of passes: 4

7.4 Standard methods of solution · The explanation · step 3 of 16 · part 3 of 5

Totalling and counting (continued)

DECLARE Marks : ARRAY[1:6] OF INTEGER
DECLARE Index : INTEGER
DECLARE Total : INTEGER
DECLARE PassCount : INTEGER
// Marks already holds 34, 48, 21, 40, 15, 45
Total ← 0
PassCount ← 0
FOR Index ← 1 TO 6
  Total ← Total + Marks[Index]
  IF Marks[Index] >= 25
    THEN
      PassCount ← PassCount + 1
  ENDIF
NEXT Index
OUTPUT "Total: ", Total
OUTPUT "Number of passes: ", PassCount

7.4 Standard methods of solution · The explanation · step 3 of 16 · part 4 of 5

Totalling and counting (continued)

marks = [34, 48, 21, 40, 15, 45]
total = 0
pass_count = 0
for index in range(6):
    total = total + marks[index]
    if marks[index] >= 25:
        pass_count = pass_count + 1
print("Total:", total)
print("Number of passes:", pass_count)

7.4 Standard methods of solution · The explanation · step 3 of 16 · part 5 of 5

Totalling and counting (continued)

!Watch out

Setting Total to 0 inside the loop is a classic error. The total is wiped each time round, so only the last value is kept.

7.4 Standard methods of solution · The explanation · step 8 of 16 · part 1 of 2

How many comparisons? (extra)

This formula is not in the syllabus. It is useful for understanding why bubble sort is slow for long lists.

In the worst case every pass is needed. With n items, pass 1 makes n − 1 comparisons, pass 2 makes n − 2, and so on down to 1.

Adding these gives n(n − 1) ÷ 2. Double the list and the work goes up about four times.

7.4 Standard methods of solution · The explanation · step 8 of 16 · part 2 of 2

How many comparisons? (extra) (continued)

e.g.Example
n = 5: (5 × 4) ÷ 2 = 10 comparisons. Check: 4 + 3 + 2 + 1 = 10. This matches the table above. n = 30 (a class): (30 × 29) ÷ 2 = 435 n = 1000: (1000 × 999) ÷ 2 = 499 500
?Why?

This shows why a sort that is fine for a class list is too slow for a million customers. Faster sorts exist, but they are not in this course.

The explanation · 12 more steps

More on the lesson page

The lesson page has the rest of the explanation, step by step:

  • Finding the maximum and minimum
  • Finding the average
  • Linear search
  • Bubble sort
  • Be precise, and amend with care
  • The 15-mark scenario question: plan first
  • Model answer in pseudocode and Python
  • How the 15 marks are awarded
  • The shape of a query
  • Predicting output: one condition
  • AND: both conditions must be true
  • OR: at least one condition must be true

Open the lesson page

Year 11 · Computer Science · Final revision and the exams · Lesson 5 of 5

Quick quiz · 1 of 3

A MAC address is…

  1. A The fixed hardware address of a network card
  2. B The name of a website
  3. C Given out by the router each time

A. The fixed hardware address of a network card

The IP address can change; the MAC is burnt in at the factory.

Year 11 · Computer Science · Final revision and the exams · Lesson 5 of 5

Quick quiz · 2 of 3

Which of these is system software?

  1. A A word processor
  2. B The operating system
  3. C A game

B. The operating system

System software runs the computer. Applications do jobs for people.

Year 11 · Computer Science · Final revision and the exams · Lesson 5 of 5

Quick quiz · 3 of 3

The bootloader…

  1. A Translates Python
  2. B Prints documents
  3. C Loads the operating system from storage into RAM at start-up

C. Loads the operating system from storage into RAM at start-up

It lives in ROM and runs first when the power comes on.

Year 11 · Computer Science · Final revision and the exams · Lesson 5 of 5

Exit ticket

Answer on paper before you go. Then check.

  1. An interrupt is…

    A A signal that makes the CPU pause and deal with somethingB A loop that never endsC A type of virus

    A. A signal that makes the CPU pause and deal with something A key press or a printer out of paper. The CPU saves its place, handles it, carries on.

  2. A compiler…

    A Translates one line at a time, every runB Only checks spellingC Translates the whole program once into machine code

    C. Translates the whole program once into machine code It produces an executable file. Errors are reported at the end.

Year 11 · Computer Science · Final revision and the exams · Lesson 5 of 5

Homework and the challenge

Homework

The Glossary tab, one letter a night; the quiz mixes.

End-of-unit challenge

The Cambridge examinations: Paper 1 and Paper 2, June series.