An original Thinka practice paper modelled on the structure and difficulty of the Nov 2024 (V3) Cambridge IGCSE Computer Science (0478) paper. Not affiliated with or reproduced from Cambridge.
Section 1 (Paper 1 Theory)
Answer all questions. Calculators are not allowed.
18 Question · 53 marks
Question 1 · multiple_choice
1 marks
Tick (✓) one box to show which of the following is equivalent to \(2^{30}\) bytes.
A.1 kibibyte (KiB)
B.1 mebibyte (MiB)
C.1 gibibyte (GiB)
D.1 tebibyte (TiB)
Show answer & marking schemeHide answer & marking scheme
Worked solution
A kibibyte (KiB) is \(2^{10}\) bytes, a mebibyte (MiB) is \(2^{20}\) bytes, a gibibyte (GiB) is \(2^{30}\) bytes, and a tebibyte (TiB) is \(2^{40}\) bytes.
Marking scheme
1 mark for the correct answer C.
Question 2 · multiple_choice
1 marks
Tick (✓) one box to show which of the following describes half-duplex data transmission.
A.Data is transmitted in one direction only.
B.Data is transmitted in both directions simultaneously.
C.Data is transmitted in both directions, but only one direction at a time.
D.Data is transmitted along multiple wires at the same time.
Show answer & marking schemeHide answer & marking scheme
Worked solution
Half-duplex transmission allows two-way communication, but only in one direction at a time. Simplex is one-way only, and full-duplex is simultaneous two-way.
Marking scheme
1 mark for the correct answer C.
Question 3 · multiple_choice
1 marks
Tick (✓) one box to show which register holds the address of the next instruction to be fetched.
A.Memory Address Register (MAR)
B.Program Counter (PC)
C.Current Instruction Register (CIR)
D.Accumulator (ACC)
Show answer & marking schemeHide answer & marking scheme
Worked solution
The Program Counter (PC) stores the memory address of the next instruction that needs to be fetched during the instruction cycle.
Marking scheme
1 mark for the correct answer B.
Question 4 · Short answer recall
3 marks
A programmer needs to convert the denary number 205 into an 8-bit binary number and then into its hexadecimal equivalent. Show all your working.
Show answer & marking schemeHide answer & marking scheme
Worked solution
1. Convert 205 to binary by finding powers of 2: 128 + 64 + 8 + 4 + 1 = 205. This gives the 8-bit binary number 11001101. 2. Split the 8-bit binary number into two 4-bit nibbles: 1100 and 1101. 3. Convert each nibble to hexadecimal: 1100 in binary is 12 in denary, which is C in hexadecimal. 1101 in binary is 13 in denary, which is D in hexadecimal. Combining these gives CD.
Marking scheme
1 mark for correct binary working or binary value (11001101). 1 mark for showing split of binary into nibbles or hex conversion method. 1 mark for correct final hexadecimal value (CD).
Question 5 · Short answer recall
3 marks
Explain how Run-length encoding (RLE) is used to compress a text file without losing any of the original data.
Show answer & marking schemeHide answer & marking scheme
Worked solution
Run-length encoding (RLE) is a lossless compression algorithm. It scans the text file for sequences of repeating characters. Instead of storing each individual repeating character, it records the character once followed by a count of how many times it repeats sequentially (e.g., AAAAA becomes A5). Because it is lossless, no data is permanently discarded, allowing the original text to be completely reconstructed during decompression.
Marking scheme
1 mark for stating that RLE identifies sequences of repeating/consecutive characters. 1 mark for explaining that the character is stored once along with a count of its repetitions. 1 mark for stating it is lossless compression allowing the original data to be fully/exactly reconstructed.
Question 6 · Short answer recall
3 marks
A data packet is transmitted over a network. Explain how an even parity check is used to detect if an error has occurred during transmission.
Show answer & marking schemeHide answer & marking scheme
Worked solution
Before transmission, the sender calculates the parity bit for each byte of data so that the total count of 1-bits (including the parity bit) is even. When the receiver gets the data, it counts the number of 1s in each byte. If the number of 1s is odd, the receiver knows that a bit has been corrupted during transmission and an error is detected.
Marking scheme
1 mark for explaining that the sender sets the parity bit to ensure the total number of 1s is even. 1 mark for stating that the receiver counts the number of 1s in the received byte. 1 mark for explaining that if an odd number of 1s is detected, a transmission error is identified.
Question 7 · Short answer recall
3 marks
Explain the role of a public key and a private key in securing communication using asymmetric encryption.
Show answer & marking schemeHide answer & marking scheme
Worked solution
In asymmetric encryption, a matched pair of keys is used. The public key is made freely available to anyone who wants to send encrypted data to the owner. This public key is used strictly to encrypt the data. The private key is kept completely secret by the owner and is used to decrypt the incoming encrypted data. Because the keys are mathematically linked, only the private key can decrypt what the corresponding public key encrypted, securing the channel.
Marking scheme
1 mark for explaining that the public key is distributed openly and used by the sender to encrypt the data. 1 mark for explaining that the private key is kept secret by the receiver and used to decrypt the data. 1 mark for stating that data encrypted with a public key can only be decrypted by the matching private key.
Question 8 · Short answer recall
3 marks
Describe the role of the Control Unit (CU) during the fetch-decode-execute cycle.
Show answer & marking schemeHide answer & marking scheme
Worked solution
The Control Unit (CU) is a critical component of the CPU. During the fetch-decode-execute cycle, it manages and coordinates all activities within the processor. It decodes the instruction fetched from memory to determine what operation needs to be carried out (using an instruction set). Finally, it directs the flow of data by sending control signals (such as read, write, or ALU start signals) to other hardware components to execute the instruction.
Marking scheme
1 mark for stating that the CU manages/coordinates the flow of data and execution of instructions. 1 mark for explaining that it decodes the fetched instruction (using an instruction set). 1 mark for explaining that it sends control signals to other hardware components to execute the decoded instruction.
Question 9 · Short answer recall
3 marks
Explain how a Domain Name Server (DNS) resolves a URL entered into a web browser into an IP address.
Show answer & marking schemeHide answer & marking scheme
Worked solution
When a user types a URL (such as www.example.com) into a web browser, the browser sends a request containing the domain name to a Domain Name Server (DNS). The DNS contains a database of domain names matched with their corresponding IP addresses. The DNS looks up the domain name in this database. Once the correct IP address is found, the DNS sends this IP address back to the user's web browser so that the browser can connect directly to the hosting web server.
Marking scheme
1 mark for stating that the browser sends the URL / domain name to the DNS server. 1 mark for explaining that the DNS looks up the domain name in a database of matching IP addresses. 1 mark for stating that the DNS returns the corresponding IP address to the web browser to establish a connection.
Question 10 · Short answer recall
3 marks
An automated greenhouse system controls the ambient temperature. State the roles of the sensor, microprocessor, and actuator in this automated system.
Show answer & marking schemeHide answer & marking scheme
Worked solution
In an automated greenhouse system: 1) The temperature sensor continuously measures the physical ambient temperature and converts it to digital signals to send to the microprocessor. 2) The microprocessor receives the sensor readings, compares them with pre-programmed threshold/set temperatures, and decides if any action is needed. 3) The actuator receives signals from the microprocessor to perform physical work, such as opening vents, turning on a heater, or starting a cooling fan.
Marking scheme
1 mark for stating the sensor's role: continuously measures the physical temperature and sends data. 1 mark for stating the microprocessor's role: compares sensor values against preset limits to make a decision. 1 mark for stating the actuator's role: receives signals to execute a physical action (e.g., turn on heater/open vent).
Question 11 · Short answer recall
3 marks
Describe three features of an Integrated Development Environment (IDE) that assist a programmer when writing and debugging program code.
Show answer & marking schemeHide answer & marking scheme
Worked solution
An IDE provides several built-in tools to support software development: 1) Syntax highlighting: automatically colors different parts of the code (such as variables, keywords, and strings) so the programmer can easily read the code and spot missing brackets or typos. 2) Auto-completion: suggests keywords, variables, or functions as the programmer types, reducing coding time and spelling mistakes. 3) Debugging tools: allows the programmer to set breakpoints, step through the code line-by-line, and inspect variable values to find and fix errors.
Marking scheme
1 mark for identifying and describing syntax highlighting (colors code to assist readability / error spotting). 1 mark for identifying and describing auto-completion / predictive text (suggests constructs/variables to minimize mistakes). 1 mark for identifying and describing debugging features (e.g., breakpoints, variable watch, error diagnostics to locate runtime errors).
Question 12 · Short answer recall
3 marks
A computer uses an even parity check to detect errors in transmitted data. Describe how a parity check is used to detect if an error has occurred during transmission.
Show answer & marking schemeHide answer & marking scheme
Worked solution
First, the sender counts the number of 1s in the byte of data. It then sets the parity bit to either 0 or 1 so that the total number of 1s in the byte (including the parity bit) is even. When the receiver gets the byte, it counts the number of 1s. If the count of 1s is odd, the receiver knows a transmission error has occurred.
Marking scheme
One mark for each of the following points, up to a maximum of three marks: 1. The sender counts the number of 1s in the data byte before transmission. 2. The parity bit is set (to 0 or 1) so that the total count of 1s is even. 3. The receiver counts the number of 1s in the received byte and detects an error if the count is odd.
Question 13 · Short answer recall
3 marks
Describe the role of the Program Counter (PC) during the fetch stage of the fetch-decode-execute cycle.
Show answer & marking schemeHide answer & marking scheme
Worked solution
During the fetch stage, the Program Counter (PC) holds the address of the next instruction that needs to be fetched from memory. This address is copied from the PC into the Memory Address Register (MAR). Immediately after this, the PC is incremented by one so that it contains the address of the next logical instruction to be executed.
Marking scheme
One mark for each of the following points, up to a maximum of three marks: 1. The PC holds/stores the address of the next instruction to be fetched from memory. 2. This address is sent/copied to the Memory Address Register (MAR). 3. The Program Counter (PC) is incremented by one (to point to the next sequential instruction address).
Question 14 · structured
4 marks
A web developer uses hexadecimal codes to represent colors on a website. One color code is represented by the hexadecimal value #3A9C8F. Convert the hexadecimal values 3A and 8F into 8-bit binary integers. Show your working.
Show answer & marking schemeHide answer & marking scheme
Worked solution
For 3A: Convert 3 to 4-bit binary: 0011. Convert A (10) to 4-bit binary: 1010. Combine them: 00111010. For 8F: Convert 8 to 4-bit binary: 1000. Convert F (15) to 4-bit binary: 1111. Combine them: 10001111.
Marking scheme
1 mark for showing valid working (e.g., splitting digits or showing division/place values). 1 mark for correct binary representation of 3A (00111010). 1 mark for showing valid working for 8F. 1 mark for correct binary representation of 8F (10001111).
Question 15 · structured
4 marks
A file is transmitted across a network. A checksum is used to detect if any transmission errors have occurred. Explain how a checksum is used to check for errors in the transmitted data.
Show answer & marking schemeHide answer & marking scheme
Worked solution
1. The checksum is calculated at the sender side using a specific algorithm. 2. The checksum is sent with the data. 3. The receiver recalculates the checksum using the same algorithm. 4. The receiver compares both checksums. If they match, no error is assumed; if they differ, an error occurred.
Marking scheme
1 mark: Sender calculates checksum from the data block using an algorithm. 1 mark: Checksum is sent/transmitted alongside the data block. 1 mark: Receiver recalculates checksum from received data using the same algorithm. 1 mark: Receiver compares both values, detecting an error if they do not match.
Question 16 · structured
4 marks
During the fetch stage of the fetch-decode-execute cycle, several registers are used. Describe the role of the Program Counter (PC) and how it interacts with the Memory Address Register (MAR) during this stage.
Show answer & marking schemeHide answer & marking scheme
Worked solution
At the start of the fetch stage, the PC contains the address of the next instruction to be fetched. This address is copied to the MAR via the address bus. The PC is then incremented by 1 so it points to the next instruction. The MAR holds the address while memory is accessed.
Marking scheme
1 mark: Program Counter (PC) stores/holds the address of the next instruction to be fetched. 1 mark: This address is copied from the PC to the Memory Address Register (MAR). 1 mark: PC is incremented by 1 (to point to the next instruction address). 1 mark: MAR holds the address currently being read from memory/RAM.
Question 17 · structured
4 marks
A video editing company stores high-definition video files on their local server for active projects. They are deciding whether to use lossy or lossless compression to store these master files. State which type of compression is more suitable for this purpose and explain three reasons for your choice.
Show answer & marking schemeHide answer & marking scheme
Worked solution
Lossless compression is the correct choice because: 1. It reconstructs the exact original file without any data loss, ensuring original quality is kept. 2. Repeated saves during video editing won't cause generation loss. 3. High quality is required for color grading and visual effects, where lossy artifacts would degrade the output.
Marking scheme
1 mark: Correctly identifies 'Lossless compression' as the suitable type. Max 3 marks for reasons: 1 mark: No data is permanently discarded / exact original file can be reconstructed. 1 mark: Avoids generation loss/degradation when the video is repeatedly edited and saved. 1 mark: High quality/fine details are preserved, which is essential for professional editing, color grading, or VFX.
Question 18 · structured
4 marks
An automated smart home system is designed to keep a living room's humidity at a comfortable level. The system uses a humidity sensor, a microprocessor, and a humidifier (actuator). Explain how these components work together to automatically control the room's humidity.
Show answer & marking schemeHide answer & marking scheme
Worked solution
1. The humidity sensor continuously monitors/takes readings of the room's humidity. 2. The analog readings are converted to digital (via an ADC) and sent to the microprocessor. 3. The microprocessor compares the humidity value against a pre-set range/target. 4. If the humidity is below the target, the microprocessor sends a control signal to the actuator to turn on the humidifier. This feedback loop runs continuously.
Marking scheme
Max 4 marks from: 1 mark: Humidity sensor continuously measures/samples humidity levels and sends data to the microprocessor. 1 mark: Microprocessor compares the sensor readings to stored/target pre-set values. 1 mark: If the humidity is below the threshold, a signal is sent to the actuator. 1 mark: The actuator physically turns the humidifier on (or off when target is met). 1 mark: The process operates continuously in a feedback loop.
Ready to test yourself?
Turn these notes into exam-style practice. Get unlimited AI questions on this topic with instant marking and explanations.
Answer all questions. Write all programs in pseudocode or program code.
7 Question · 43 marks
Question 1 · Syntax Completion
4 marks
An incomplete pseudocode algorithm is designed to find the highest score stored in a 1D array `Scores` of 100 integers (indexed from 1 to 100) and count how many students achieved this highest score.
Complete the pseudocode by writing the missing statements in the spaces provided.
```pseudocode 01 MaxScore Scores[1] 02 Count 1 03 FOR Index 2 TO 100 04 IF Scores[Index] > MaxScore 05 THEN 06 MaxScore _________________ (1) 07 Count ____________________ (2) 08 ELSE 09 IF Scores[Index] = MaxScore 10 THEN 11 Count __________________ (3) 12 ENDIF 13 ENDIF 14 NEXT Index 15 OUTPUT _________________________ (4) ```
Show answer & marking schemeHide answer & marking scheme
Worked solution
Line 06: A new maximum score is found, so `MaxScore` must be updated with the current element `Scores[Index]`. Line 07: Since a new maximum is found, the count of occurrences must be reset to `1`. Line 11: If the score equals the current maximum, the count of occurrences is incremented by `Count + 1`. Line 15: The final values of the maximum score and the count must be printed: `MaxScore, Count`.
Marking scheme
1 mark for each correct line: - (1): `Scores[Index]` - (2): `1` - (3): `Count + 1` - (4): `MaxScore, Count` (accept any order or equivalent combination to output both variables)
Question 2 · Syntax Completion
4 marks
An incomplete pseudocode algorithm is designed to read names of items and their prices from a user and save them to a sequential text file `StockItems.txt`. The process stops when the user enters the value "END" as the item name.
Complete the pseudocode by writing the missing statements in the spaces provided.
```pseudocode 01 OPEN "StockItems.txt" FOR _______________ (1) 02 OUTPUT "Enter item name or END to stop: " 03 INPUT ItemName 04 WHILE ___________________ (2) 05 OUTPUT "Enter price: " 06 INPUT Price 07 _______________________ (3) 08 _______________________ (4) 09 OUTPUT "Enter item name or END to stop: " 10 INPUT ItemName 11 ENDWHILE 12 CLOSE "StockItems.txt" ```
Show answer & marking schemeHide answer & marking scheme
Worked solution
Line 01 opens the file in writing mode: `WRITE` (or `APPEND`). Line 04 implements the loop condition: `ItemName <> "END"` (or `ItemName != "END"`). Line 07 writes the string value of the item's name: `WRITEFILE "StockItems.txt", ItemName`. Line 08 writes the numeric value of the item's price: `WRITEFILE "StockItems.txt", Price`.
Marking scheme
1 mark for each correct line: - Line 01: `WRITE` (or `APPEND`) - Line 04: `ItemName <> "END"` (or equivalent inequality check, e.g. `ItemName != "END"`) - Line 07: `WRITEFILE "StockItems.txt", ItemName` - Line 08: `WRITEFILE "StockItems.txt", Price`
Question 3 · Syntax Completion
4 marks
An incomplete pseudocode algorithm is designed to perform a linear search on a 1D array `Names` containing 50 elements to check if a specific name `SearchTarget` is present. It should output the index where it was found, or a "Not Found" message.
Complete the pseudocode by writing the missing statements in the spaces provided.
```pseudocode 01 Found FALSE 02 Index 1 03 INPUT SearchTarget 04 WHILE ___________________________ (1) 05 IF Names[Index] = SearchTarget 06 THEN 07 Found TRUE 08 ELSE 09 ___________________________ (2) 10 ENDIF 11 ENDWHILE 12 IF _______________________________ (3) 13 THEN 14 OUTPUT SearchTarget, " found at index ", ____________ (4) 15 ELSE 16 OUTPUT SearchTarget, " not found" 17 ENDIF ```
Show answer & marking schemeHide answer & marking scheme
Worked solution
Line 04 requires the loop to continue as long as the target has not been found and the index is within the array bounds: `Found = FALSE AND Index <= 50`. Line 09 increments the pointer `Index` if the target is not found: `Index Index + 1`. Line 12 checks if the search was successful: `Found = TRUE` (or simply `Found`). Line 14 outputs the matching position: `Index`.
Marking scheme
1 mark for each correct line: - Line 04: `Found = FALSE AND Index <= 50` (or `NOT Found AND Index <= 50`) - Line 09: `Index Index + 1` (accept `Index = Index + 1`) - Line 12: `Found = TRUE` (accept `Found`) - Line 14: `Index`
Question 4 · Syntax Completion
4 marks
An incomplete pseudocode algorithm is designed to input exactly 10 test marks, validate that each mark is between 0 and 100 inclusive, calculate the total sum of valid marks, and output the average of these marks.
Complete the pseudocode by writing the missing statements in the spaces provided.
```pseudocode 01 Total 0 02 FOR Count 1 TO 10 03 REPEAT 04 OUTPUT "Enter a mark (0-100): " 05 INPUT Mark 06 UNTIL ___________________________________ (1) 07 Total _________________________________ (2) 08 NEXT Count 09 Average _________________________________ (3) 10 OUTPUT "The average mark is: ", __________ (4) ```
Show answer & marking schemeHide answer & marking scheme
Worked solution
Line 06 ensures the user inputs a valid mark between 0 and 100 inclusive: `Mark >= 0 AND Mark <= 100`. Line 07 adds the valid mark to the accumulator: `Total Total + Mark`. Line 09 calculates the arithmetic mean: `Average Total / 10`. Line 10 outputs the computed variable: `Average`.
Marking scheme
1 mark for each correct line: - Line 06: `Mark >= 0 AND Mark <= 100` (accept equivalent logical checks) - Line 07: `Total + Mark` (accept `Total Total + Mark`) - Line 09: `Total / 10` (accept `Total / Count` or equivalent) - Line 10: `Average`
Question 5 · practical
6 marks
An algorithm is shown in the following pseudocode. The 1D array `Arr` contains the values `[12, 5, 18, 9, 15]` in positions 1 to 5 respectively.
Show answer & marking schemeHide answer & marking scheme
Worked solution
The trace table should be filled out as follows by walking through each loop iteration: - Initial state: Count is initialized to 0. - Iteration 1: Index is 1, Arr[1] is 12. Since 12 > 10, Temp becomes 24, Count increments to 1. Output is 24. - Iteration 2: Index is 2, Arr[2] is 5. Since 5 <= 10, Temp becomes 10. Count remains 1 (leave blank/unchanged in table). Output is 10. - Iteration 3: Index is 3, Arr[3] is 18. Since 18 > 10, Temp becomes 36, Count increments to 2. Output is 36. - Iteration 4: Index is 4, Arr[4] is 9. Since 9 <= 10, Temp becomes 14. Count remains 2. Output is 14. - Iteration 5: Index is 5, Arr[5] is 15. Since 15 > 10, Temp becomes 30, Count increments to 3. Output is 30. - After the loop finishes: The final instruction outputs the text: \"Total processed high: 3\".
Marking scheme
- 1 mark for correct trace of Index = 1 (Count=1, Temp=24, Output=24) - 1 mark for correct trace of Index = 2 (Count unchanged, Temp=10, Output=10) - 1 mark for correct trace of Index = 3 (Count=2, Temp=36, Output=36) - 1 mark for correct trace of Index = 4 (Count unchanged, Temp=14, Output=14) - 1 mark for correct trace of Index = 5 (Count=3, Temp=30, Output=30) - 1 mark for correct final output outside loop (\"Total processed high: 3\")
Question 6 · practical
6 marks
A chemical reactor safety system uses three sensors to control an alarm siren **S**. The siren is activated (outputs 1) if either: - The temperature **T** is too high (1) AND the pressure **P** is too high (1) - OR the cooling system **C** is inactive (0) AND the pressure **P** is too high (1)
Show answer & marking schemeHide answer & marking scheme
Worked solution
We can write the logic condition as the Boolean expression: \( S = (T \text{ AND } P) \text{ OR } (\text{NOT } C \text{ AND } P) \)
Let's evaluate this for each row in the table: 1) T = 0, P = 0, C = 0: \( (0 \cdot 0) + (1 \cdot 0) = 0 \) 2) T = 0, P = 0, C = 1: \( (0 \cdot 0) + (0 \cdot 0) = 0 \) 3) T = 0, P = 1, C = 0: \( (0 \cdot 1) + (1 \cdot 1) = 1 \) 4) T = 0, P = 1, C = 1: \( (0 \cdot 1) + (0 \cdot 1) = 0 \) 5) T = 1, P = 0, C = 0: \( (1 \cdot 0) + (1 \cdot 0) = 0 \) 6) T = 1, P = 0, C = 1: \( (1 \cdot 0) + (0 \cdot 0) = 0 \) 7) T = 1, P = 1, C = 0: \( (1 \cdot 1) + (1 \cdot 1) = 1 \) 8) T = 1, P = 1, C = 1: \( (1 \cdot 1) + (0 \cdot 1) = 1 \)
Marking scheme
Award marks based on the correctness of the final output column S: - 6 marks for all 8 rows correct. - 5 marks for 7 rows correct. - 4 marks for 5 or 6 rows correct. - 2 marks for 3 or 4 rows correct. - 1 mark for 1 or 2 rows correct.
Members of a high school running club complete a timed 5 km run every month. Members’ names are stored in a one-dimensional (1D) array `RunnerName[]`.
Each member's run time is stored in another one-dimensional (1D) array `RunTime[]`. The times are stored as minutes with two decimal places, for example `24.50`.
The position of each member's data in the two arrays is the same. For example, the member stored at index 10 in `RunnerName[]` and at index 10 in `RunTime[]` is the same.
Every month, medals are awarded to the members of the club who have the two fastest times (the lowest times). Certificates are also awarded to all members with a run time of under 30.00 minutes.
Write a program that meets the following requirements: - allows the run times of members to be input and validated - sorts the arrays `RunTime[]` and `RunnerName[]` in ascending order of time (since fastest is lowest time) - outputs the member names and run times of the members with the two fastest times and identifies them as "Gold Medalist" and "Silver Medalist" - stores the names of all the members who will receive a certificate in the array `CertWinners[]` - outputs a message stating the number of certificates to be printed.
You must use pseudocode or program code and add comments to explain how your code works.
You do not need to declare any arrays or variables; you may assume that this has already been done.
All inputs and outputs must contain suitable messages.
You do not need to initialise the data in the array `RunnerName[]`.
Show answer & marking schemeHide answer & marking scheme
Worked solution
An exemplar pseudocode solution is shown below:
``` CONSTANT ClubSize = 50
// Input and validate 5km run times FOR Index <- 1 TO ClubSize REPEAT OUTPUT "Please enter the 5km run time (in minutes) for ", RunnerName[Index], ": " INPUT RunTime[Index] UNTIL RunTime[Index] >= 10.00 AND RunTime[Index] <= 120.00 NEXT Index
// Bubble Sort ascending order Last <- ClubSize REPEAT Swap <- FALSE FOR Index <- 1 TO Last - 1 IF RunTime[Index] > RunTime[Index + 1] THEN TempTime <- RunTime[Index] RunTime[Index] <- RunTime[Index + 1] RunTime[Index + 1] <- TempTime
Swap <- TRUE ENDIF NEXT Index Last <- Last - 1 UNTIL NOT Swap OR Last = 1
// Output top 2 results OUTPUT "Gold Medalist: ", RunnerName[1], " with a time of ", RunTime[1] OUTPUT "Silver Medalist: ", RunnerName[2], " with a time of ", RunTime[2]
// Track certificate recipients CertCount <- 0 Index <- 1 WHILE Index <= ClubSize AND RunTime[Index] < 30.00 DO CertCount <- CertCount + 1 CertWinners[CertCount] <- RunnerName[Index] Index <- Index + 1 ENDWHILE
OUTPUT "The total number of certificates to be printed is ", CertCount ```
Marking scheme
### AO2: Apply knowledge and understanding (Max 9 marks)
#### Requirements targeted: - **R1:** Input and validation loop for times (range checking, e.g., between 10.00 and 120.00 minutes). - **R2:** Sort algorithm (nested loop, swapping parallel arrays in ascending order of time). - **R3:** Output the two fastest members, store names of those under 30.00 in `CertWinners[]`, count and output total certificates.
| Marks | Description | | :--- | :--- | | **7-9** | All 3 requirements are fully covered using appropriate programming techniques. Arrays/data structures are used correctly to store all specified data. | | **4-6** | Most requirements are met. At least two requirements are successfully covered with appropriate techniques. | | **1-3** | At least one programming technique has been used (such as simple selection or basic input/output). Minimal appropriate storage. | | **0** | No creditable response. |
### AO3: Provide solutions by evaluating and presenting conclusions (Max 6 marks)
| Marks | Description | | :--- | :--- | | **5-6** | The program is fully commented with clear, meaningful explanation comments. All identifiers used are highly descriptive. The logic is fully correct, structured, and accurate. | | **3-4** | The program contains some relevant comments. Most identifiers are reasonably named. The code contains minor structural inaccuracies but successfully meets most requirements. | | **1-2** | Program is seen with minimal comments or poorly named variables. The solution is partially illogical or contains many bugs, attempting only one of the tasks. | | **0** | No creditable response. |
Wondering how well you actually know this?
thinka is an AI practice app for IGCSE & IB students: unlimited questions, instant auto-marking, and detailed step-by-step solutions. 100,000+ students use it to confirm they actually know it, not just think they do.