Skip to content

← International Baccalaureate · IB Diploma · Computer Science · SL

Revision questions

PDF ↓

Original teaching material. Check the course coverage gaps and your school’s current specification before using it for assessment.

Original open focus revision; complete specification coverage remains unfinished.

1 · Computing systems, networks and requirements

authentication · authorization

ib_computer_science_sl:computing_systems:open:1 · 2 marks

Which question concerns authorization?

  • Who are you?
  • May this user edit this record?
  • What colour is the login screen?
Answer and reasoning

May this user edit this record?

  • Separate authentication from authorization. Authentication checks identity; authorization determines permitted actions. A threat model connects a valuable asset, a possible attack and an appropriate control.

ib_computer_science_sl:computing_systems:open:2 · 4 marks

A 40 million bit file transfers at 5 million bits per second. Find ideal time.

Answer and reasoning

8 s

  • Appropriate relation; consistent substitution; correct result; meaningful unit and interpretation.

Bandwidth is not actual end-to-end throughput. Encryption does not by itself ensure correct authorization or remove every security risk.

2 · Networks: latency, throughput and layered delivery

throughput · latency

ib_computer_science_sl:networks:open:1 · 2 marks

Why can completion exceed file-size divided by link rate?

  • Overhead, queueing and other delays
  • Bits have no size
  • All networks transmit instantly
Answer and reasoning

Overhead, queueing and other delays

  • Transmission time depends on data size and rate. Total delay may also include propagation, processing and queueing. Encryption protects content under its assumptions but does not remove congestion or every metadata exposure.

ib_computer_science_sl:networks:open:2 · 4 marks

A 12 megabit file crosses a 3 megabit/s link. Calculate ideal transmission time.

Answer and reasoning

4 s

  • Appropriate relation; consistent substitution; correct result; meaningful unit and interpretation.

A megabyte is eight megabits before considering overhead. A faster rated link does not guarantee low latency or secure endpoints.

3 · Relational databases: a key and a relationship

primary key · foreign key

ib_computer_science_sl:databases:open:1 · 2 marks

Which design helps avoid duplicated customer-address updates?

  • Separate customers and orders linked by keys
  • Repeat the address in every order without a rule
  • Use names as guaranteed unique identifiers
Answer and reasoning

Separate customers and orders linked by keys

  • A join combines rows according to a specified condition. The result count depends on relationship cardinality and filters. A foreign key constraint enforces a relationship rule; it does not automatically encrypt personal data.

ib_computer_science_sl:databases:open:2 · 4 marks

Three customers have 1, 3 and 2 orders. How many rows does the customer-order inner join return?

Answer and reasoning

6 rows

  • Appropriate relation; consistent substitution; correct result; meaningful unit and interpretation.

A primary key need not be a person name. A join is not a simple concatenation of tables. Use parameterized queries for untrusted input rather than building SQL from raw strings.

4 · Data models and responsible machine learning

primary key · data leakage

ib_computer_science_sl:computing_data:open:1 · 2 marks

Why keep test data separate from training data?

  • To assess generalization to unseen cases
  • To guarantee causation
  • To make all predictions correct
Answer and reasoning

To assess generalization to unseen cases

  • A primary key uniquely identifies a record; a foreign key relates records. In prediction, leakage can expose information unavailable at the real decision time. Accuracy alone may hide an unbalanced target distribution.

ib_computer_science_sl:computing_data:open:2 · 4 marks

A model makes 72 correct predictions out of 80. Find accuracy percentage.

Answer and reasoning

90 %

  • Appropriate relation; consistent substitution; correct result; meaningful unit and interpretation.

High accuracy is not evidence of fairness or causal understanding. A database primary key is not simply whichever field looks important.

5 · Algorithms, traces and correctness evidence

algorithm · boundary test

ib_computer_science_sl:computing_algorithms:open:1 · 2 marks

What must hold before applying ordinary binary search to a list?

  • The list is ordered under the comparison rule
  • Every value is different
  • The list contains exactly ten items
Answer and reasoning

The list is ordered under the comparison rule

  • State input conditions and expected outputs. Use boundary cases, empty collections where allowed, duplicates and invalid values. Distinguish a wrong algorithm from a wrong implementation or an incomplete requirement.

ib_computer_science_sl:computing_algorithms:open:2 · 4 marks

A linear search scans all 14 items without a match. How many item comparisons occur?

Answer and reasoning

14 comparisons

  • Appropriate relation; consistent substitution; correct result; meaningful unit and interpretation.

A successful sample test does not prove correctness for all valid inputs. Do not import Cambridge-specific pseudocode syntax into an IB course without a course source.

6 · Objects: state, behaviour and an interface

encapsulation · instance

ib_computer_science_sl:oop:open:1 · 2 marks

What should prevent an invalid state change?

  • An operation that checks and preserves the invariant
  • Making every field publicly writable
  • Assuming no user makes an error
Answer and reasoning

An operation that checks and preserves the invariant

  • A method call acts on a particular instance. State changes should satisfy preconditions and postconditions. Polymorphism lets code use a common interface with different implementations when the contract is respected.

ib_computer_science_sl:oop:open:2 · 4 marks

An instance starts at 12 units, adds 8 and removes 3. Find its final value.

Answer and reasoning

17 units

  • Appropriate relation; consistent substitution; correct result; meaningful unit and interpretation.

A class is not the same thing as one instance. Inheritance is not automatically better than composition. Merely hiding a field does not prove that all operations preserve valid state.

7 · Computing case analysis: evaluate a proposed system

throughput · acceptance test

ib_computer_science_sl:computing_case_evidence:open:1 · 2 marks

Which statement best supports a technical recommendation?

  • A mechanism tied to a scenario requirement and a measurable acceptance test
  • A popular architecture name without scenario evidence
  • A throughput measurement claimed to prove every performance property
Answer and reasoning

A mechanism tied to a scenario requirement and a measurable acceptance test

  • A recommendation should connect a requirement to a mechanism and an observable test. For example, a concurrency problem requires a strategy that prevents conflicting updates, plus tests demonstrating the invariant. A claim about faster response requires comparable workload measurements rather than only a complexity label. Evaluate alternatives under the same stated conditions.

ib_computer_science_sl:computing_case_evidence:open:2 · 4 marks

A fictional system successfully processes 210 requests in 30 s. Calculate throughput.

Answer and reasoning

7 requests/s

  • Appropriate relation; consistent substitution; correct result; meaningful unit and interpretation.

Throughput is not response time. A strong recommendation states the conditions in which it is expected to work and the evidence that could disconfirm it. Current official CS case-study requirements must be checked against the applicable assessment version.

Log in or create account

IGCSE, A-Level & AP