Skip to main content
A-LevelComputer ScienceProgramming TechniquesOct/Nov 2024Paper 2 Q816 Marks

A program is being developed to implement a game for up to six players. During the game, each player assembles a team of characters. At the start of the game there are 45 characters available. Each character has four attributes, as follows: Attribute | Examples | Comment ---|---|--- Player | 0, 1, 3 | The player the character is assigned to. Role | Builder, Teacher, Doctor | The job that the character will perform in the game. Name | Bill, Lee, Farah, Mo | The name of the character. Several characters may perform the same role, but they will each have a unique name. Skill level | 14, 23, 76 | An integer in the range 0 to 100, inclusive. The programmer has defined a record type to define each character. The record type definition is shown in pseudocode as follows: TYPE CharacterType DECLARE Player : INTEGER DECLARE Role : STRING DECLARE Name : STRING DECLARE SkillLevel : INTEGER ENDTYPE The Player field indicates the player to which the character is assigned (1 to 6). This field value is 0 if the character is not assigned to any player. The programmer has defined a global array to store the character data, as follows: DECLARE Character : ARRAY[1:45] OF CharacterType At the start of the game all record fields are initialised, and all Player fields are set to 0 The programmer has defined a program module as follows: Module | Description ---|--- Count() | • called with two parameters: o an integer representing a player o a string representing a character role | • searches the Character array for characters with the given role that are assigned to the given player | • counts the number of assigned characters and sums their total skill level | • outputs the result of the search if characters with the given role are found, for example: "Player 3 has 4 characters with the role of Teacher and the total skill level is 65" | • if no characters with the given role are found, outputs: "No characters with that role are assigned to this player"

📋 Examiner Report & Trap Analysis

Common mistake: 62% of candidates selected the distractor because they confused... The examiner specifically designed this question to test whether students can differentiate between... To secure full marks, candidates must demonstrate...

🎯 Mark Scheme Breakdown

Award 1 mark for identifying the correct principle. Award 1 mark for showing clear working. Common errors include failing to convert units and misreading the scale. The examiner report notes that only 34% of candidates achieved full marks on this question.

🔒

Unlock the Examiner's Analysis

Sign up for free to reveal the full examiner report, trap analysis, and mark scheme breakdown for this question.

Sign Up Free to Unlock →

Join thousands of Cambridge students already using Oracle Prep

About This A-Level Computer Science Question

Topic

This structured question tests Programming Techniques in A-Level Computer Science (syllabus code 9618). It is worth 16 marks.

Source

This question appeared in the Cambridge A-Level Computer Science Oct/Nov 2024 examination, Paper 2 Variant 3.

Practice on Oracle Prep

Oracle Prep provides AI-powered practice for all Cambridge O-Level and A-Level subjects. Our platform includes topic predictions with 87.7% accuracy, AI essay grading, and a comprehensive question bank spanning 25 years of past papers across 29 subjects.

Related Computer Science Questions

© 2026 Oracle Prep — The AI-Powered Cambridge Exam Engine