Cambridge IAS-Level · PastPaper.sampleTitle

MetadataPastPaper.sampleTitle

Thinka Jun 2023 (V3) Cambridge International A Level-Style Mock — Computer Science (9618)

150 PastPaper.marks210 PastPaper.minutes2023
An original Thinka practice paper modelled on the structure and difficulty of the Jun 2023 (V3) Cambridge International A Level Computer Science (9618) paper. Not affiliated with or reproduced from Cambridge.

Paper 1 Theory Fundamentals

Answer all questions. Calculators must not be used.
7 PastPaper.question · 74.9 PastPaper.marks
PastPaper.question 1 · Short answer and diagram matching
10.7 PastPaper.marks
An analog sound wave needs to be converted into digital format for storage on a computer system. (a) Explain the terms 'Sampling Rate' and 'Sampling Resolution'. (b) Describe how increasing both the sampling rate and the sampling resolution affects: (i) the quality of the recorded sound, (ii) the file size of the digital audio file. (c) Match each of the following definitions to the correct digital audio term (choose from: Quantisation, ADC, DAC, Sampling): (i) The process of measuring the amplitude of the continuous analog sound wave at regular, predetermined intervals. (ii) The physical component that converts digital values from a computer back into a continuous electrical voltage to drive a speaker. (iii) The process of rounding an analog amplitude measurement to the nearest available binary level in the discrete digital scale.
PastPaper.showAnswers

PastPaper.workedSolution

(a) Sampling Rate: The frequency with which samples are taken per unit of time (typically per second, measured in Hz). Sampling Resolution: The number of bits used to represent/encode each sampled amplitude value (also called bit depth). (b) (i) Quality: Increases/improves because the digital signal is a closer approximation of the original continuous analog sound wave, reducing distortion (quantisation noise). (ii) File size: Increases because more data points are stored per second, and each data point requires more bits. (c) (i) Sampling, (ii) DAC (Digital-to-Analog Converter), (iii) Quantisation.

PastPaper.markingScheme

Total: 10.7 Marks. (a) 4 marks: 2 marks for clear definition of Sampling Rate (1 mark for number of samples, 1 mark for per second/Hertz); 2 marks for Sampling Resolution (1 mark for number of bits, 1 mark for representing amplitude/levels). (b) 3.7 marks: 1.85 marks for explaining quality improvement (closer approximation/less noise), 1.85 marks for explaining file size increase (more bytes/bits required per second of audio). (c) 3 marks: 1 mark each for correctly matching (i) Sampling, (ii) DAC, and (iii) Quantisation.
PastPaper.question 2 · Short answer and diagram matching
10.7 PastPaper.marks
Local Area Networks (LANs) often use shared communication media where collisions can occur. (a) Explain the purpose and operation of Carrier Sense Multiple Access / Collision Detection (CSMA/CD) in a bus network. (b) Match each of the following network hardware devices to its correct primary function: Devices: Router, Switch, Network Interface Card (NIC), Bridge. Functions: (i) Connects two different networks together, reads the destination IP address of packets, and determines the most efficient routing path. (ii) Connects two segments of the same LAN to filter and reduce collision domains, but does not route packets between different network layers. (iii) Receives data frames and forwards them only to the specific physical port of the intended receiving device using MAC addresses. (iv) Provides a physical connection to the network transmission media and holds the device's unique MAC address.
PastPaper.showAnswers

PastPaper.workedSolution

(a) Operation of CSMA/CD: 1. A node listens to the transmission channel (carrier sensing) to check if it is idle. 2. If the channel is idle, the node begins transmitting data. 3. During transmission, the node continuously monitors the channel for a collision (collision detection). 4. If a collision is detected, transmitting nodes immediately halt current transmission and send a 'jam signal' to alert all other devices on the segment. 5. Each node waits for a random period of time (backoff algorithm) before attempting to retransmit, preventing them from colliding again immediately. (b) Matches: (i) Router (connects different networks, routes packets via IP addresses). (ii) Bridge (connects LAN segments at Data Link layer). (iii) Switch (directs frames to specific ports using MAC addresses). (iv) NIC (network interface, MAC address hardware representation).

PastPaper.markingScheme

Total: 10.7 Marks. (a) 6.7 marks: 1.34 marks for each of the key steps up to 5 steps (listening before sending, sending when free, detecting collision, sending jam signal, waiting random time/backoff). (b) 4 marks: 1 mark for each correct device match ((i) Router, (ii) Bridge, (iii) Switch, (iv) NIC).
PastPaper.question 3 · Short answer and diagram matching
10.7 PastPaper.marks
The Von Neumann architecture forms the basis of modern computer processors. (a) Complete the following table by matching each task in the Fetch stage of the Fetch-Execute cycle with the correct register involved. Registers to choose from: Program Counter (PC), Memory Address Register (MAR), Memory Buffer Register / Memory Data Register (MDR), Current Instruction Register (CIR). Tasks: (i) Holds the address of the next instruction to be fetched from memory. (ii) Receives the instruction directly from the memory data bus. (iii) Holds the address of the current memory location being accessed for reading/writing. (iv) Holds the instruction that is currently being decoded and executed. (b) During the execute stage, several control signals are sent by the Control Unit (CU). Describe two main functions of the Control Unit during the execution of an instruction.
PastPaper.showAnswers

PastPaper.workedSolution

(a) (i) PC - Program Counter stores the memory address of the next instruction to be executed. (ii) MDR - Memory Data Register holds the instruction/data fetched from memory. (iii) MAR - Memory Address Register holds the address of the memory location currently being read from or written to. (iv) CIR - Current Instruction Register holds the instruction currently being decoded and executed. (b) Functions of the Control Unit (CU) during execution: 1. Instruction decoding: The CU decodes the opcode stored in the CIR to determine what operation needs to be performed. 2. Generating control signals: The CU sends synchronization and control signals (such as read/write control, bus grant, clock pulses) to coordinate the flow of data within the CPU (e.g., ALU, registers) and external devices (RAM, I/O).

PastPaper.markingScheme

Total: 10.7 Marks. (a) 6.7 marks: 1.675 marks per correct match ((i) PC, (ii) MDR, (iii) MAR, (iv) CIR). (b) 4 marks: 2 marks for each well-described function of the Control Unit during execution (e.g., decoding opcode, issuing control signals to coordinate components, managing clock synchronization).
PastPaper.question 4 · Short answer and diagram matching
10.7 PastPaper.marks
A relational database is designed to store details of projects and employees. (a) Define the following key terms used in relational database design: (i) Primary Key, (ii) Foreign Key, (iii) Composite Key. (b) Match each normalisation state below to its corresponding rules: States: First Normal Form (1NF), Second Normal Form (2NF), Third Normal Form (3NF). Rules: (i) There are no repeating groups of attributes, and all data values are atomic. (ii) The table is in 2NF, and there are no non-key transitive dependencies (i.e., no non-key attribute depends on another non-key attribute). (iii) The table is in 1NF, and there are no partial dependencies (i.e., all non-key attributes are fully dependent on the primary key, typically relevant when the primary key is composite).
PastPaper.showAnswers

PastPaper.workedSolution

(a) (i) Primary Key: An attribute or collection of attributes that uniquely identifies each record/tuple in a table. (ii) Foreign Key: An attribute in one table that refers to/matches the primary key in another table, establishing a link/relationship between the tables. (iii) Composite Key: A primary key consisting of two or more attributes that together uniquely identify a record, used when single attributes cannot guarantee uniqueness. (b) (i) First Normal Form (1NF) - no repeating groups and all values are atomic. (ii) Third Normal Form (3NF) - in 2NF and no transitive dependencies. (iii) Second Normal Form (2NF) - in 1NF and no partial key dependencies.

PastPaper.markingScheme

Total: 10.7 Marks. (a) 6 marks: 2 marks for each clear definition (Primary, Foreign, Composite). (b) 4.7 marks: 1.57 marks each for correct matching of normalisation levels ((i) 1NF, (ii) 3NF, (iii) 2NF).
PastPaper.question 5 · Short answer and diagram matching
10.7 PastPaper.marks
A software engineer is writing pseudocode for a control program. (a) Explain the difference between passing parameters 'by value' (BYVAL) and 'by reference' (BYREF). (b) Study the following pseudocode:

PROCEDURE ModifyValues(BYVAL x, BYREF y)
x <- x * 2
y <- y * 3
ENDPROCEDURE

// Main Program
a <- 10
b <- 10
ModifyValues(a, b)
OUTPUT "a = ", a, ", b = ", b

Determine the output of the main program after the procedure call. (c) Explain why using local variables is considered better practice than using global variables in modular programs.
PastPaper.showAnswers

PastPaper.workedSolution

(a) Parameter passing mechanisms: - By Value (BYVAL): A local copy of the parameter's value is created for the subroutine. Any modifications within the subroutine affect only this local copy, leaving the original calling variable unchanged. - By Reference (BYREF): The memory address of the actual parameter is passed to the subroutine. Any changes made inside the subroutine are made directly to the original variable in the calling scope. (b) Trace of execution: - Initially, a is 10 and b is 10. - a is passed by value (BYVAL), so x becomes 10 (copy). x is multiplied by 2 to become 20, but the original a remains 10. - b is passed by reference (BYREF), so y refers directly to b. y is multiplied by 3, making y (and hence b) equal to 30. - Therefore, the output is: a = 10, b = 30. (c) Benefits of local variables over global variables: 1. Encapsulation/Modularity: Local variables exist only within the scope of the subroutine, preventing accidental side-effects where other parts of the program overwrite data. 2. Reusability: Subroutines with local variables are self-contained and can be copied/moved to other projects easily. 3. Memory efficiency: Local variables are destroyed when the subroutine finishes, freeing up memory, whereas global variables persist throughout the program execution.

PastPaper.markingScheme

Total: 10.7 Marks. (a) 4 marks: 2 marks for clear explanation of BYVAL (passing a copy, no effect on original); 2 marks for BYREF (passing memory address, directly affects original). (b) 2.7 marks: 1.35 marks for stating a remains 10; 1.35 marks for stating b becomes 30. (c) 4 marks: 2 marks each for two distinct reasons (e.g., avoiding side-effects/easier debugging, self-containment for reusability, efficient memory management).
PastPaper.question 6 · Short answer and diagram matching
10.7 PastPaper.marks
Data must be protected and verified to maintain data integrity during entry and transmission. (a) Compare 'Data Validation' and 'Data Verification' and give one example of each. (b) Match each validation check to its correct description: Validation Checks: Range check, Format check, Presence check, Length check. Descriptions: (i) Ensures that a required field has not been left empty. (ii) Checks that the data entered contains the exact expected number of characters or is within specified minimum/maximum bounds of length. (iii) Verifies that data follows a specific structure or pattern of characters, such as letters and digits in a postcode (e.g. AB12 3CD). (iv) Ensures that a numerical value lies between a specified upper limit and lower limit.
PastPaper.showAnswers

PastPaper.workedSolution

(a) Comparison: - Data Validation: An automated system check performed by software to verify that the entered data meets specific, pre-defined rules/criteria (sensible, reasonable, and valid) before processing. Example: Range check (e.g., checking that a percentage is between 0 and 100). - Data Verification: A process of checking that data has been entered or transferred accurately from the source document without corruption or errors. Example: Double data entry (entering data twice and comparing) or visual check (comparing screen output with original paper source). (b) Matches: (i) Presence check - ensures required field is not empty. (ii) Length check - checks number of characters. (iii) Format check - checks structure/pattern. (iv) Range check - checks numerical upper/lower limits.

PastPaper.markingScheme

Total: 10.7 Marks. (a) 6.7 marks: 2 marks for defining Validation, 1.35 marks for a valid Validation example; 2 marks for defining Verification, 1.35 marks for a valid Verification example. (b) 4 marks: 1 mark for each correct match ((i) Presence check, (ii) Length check, (iii) Format check, (iv) Range check).
PastPaper.question 7 · Short answer and diagram matching
10.7 PastPaper.marks
Operating systems and translators are critical software components. (a) Complete the matching of the operating system tasks below to their respective categories of management: Categories: Process management, Memory management, Device management, File management. Tasks: (i) Keeps track of where files are stored on a hard drive, manages access privileges, and handles file compression. (ii) Allocates CPU time slices to active programs using scheduling algorithms. (iii) Manages virtual memory when physical RAM is full, moving data blocks (paging/swapping) between RAM and secondary storage. (iv) Communicates with peripheral hardware components using software utilities called device drivers. (b) Describe two key differences in how a Compiler and an Interpreter translate and execute a source program.
PastPaper.showAnswers

PastPaper.workedSolution

(a) Matches: (i) File management (handles directory structure, access permissions, compression). (ii) Process management (allocates processor time, handles execution states, scheduling). (iii) Memory management (handles RAM allocation, virtual memory, paging). (iv) Device management (handles peripheral communication, device drivers). (b) Key differences between Compiler and Interpreter: 1. Translation process: A compiler translates the complete source code of a program into an independent executable machine code file (object code) before run-time. An interpreter translates and executes the source code line-by-line (or statement-by-statement) at run-time without creating an independent executable file. 2. Error reporting: A compiler produces an error report for the entire program only after scanning the whole source code, meaning code cannot run until all syntax errors are fixed. An interpreter stops execution immediately at the line where an error is found, making it easier to pinpoint/debug errors on the fly.

PastPaper.markingScheme

Total: 10.7 Marks. (a) 6.7 marks: 1.675 marks per correct match ((i) File management, (ii) Process management, (iii) Memory management, (iv) Device management). (b) 4 marks: 2 marks for each well-formulated, contrasting difference (1 mark for Compiler aspect, 1 mark for corresponding Interpreter aspect).

Paper 2 Fundamental Problem-solving and Programming Skills

Answer all questions. Use pseudocode as specified.
8 PastPaper.question · 75 PastPaper.marks
PastPaper.question 1 · Algorithm implementation and structural designs
9.375 PastPaper.marks
A retail company wants to validate product codes before they are entered into the database. A valid product code must meet the following criteria:
- Exactly 8 characters long.
- The first 3 characters must be uppercase letters (A–Z).
- The 4th character must be a hyphen ('-').
- The 5th, 6th, and 7th characters must be numeric digits (0–9).
- The 8th character is a check digit. It is calculated by taking the sum of the numerical values of the 5th, 6th, and 7th characters, and then finding the remainder when divided by 10. The 8th character must match this calculated digit.

Using 9618 pseudocode, write a function ValidateCode(Code : STRING) RETURNS BOOLEAN.

You can assume the following built-in functions:
- LENGTH(s : STRING) RETURNS INTEGER
- MID(s : STRING, start : INTEGER, length : INTEGER) RETURNS STRING
- ASC(c : CHAR) RETURNS INTEGER
- STR_TO_NUM(s : STRING) RETURNS INTEGER
PastPaper.showAnswers

PastPaper.workedSolution

The function first checks if the string length is exactly 8. It then validates characters 1 to 3 to verify they are within the uppercase ASCII range (65-90). Character 4 is checked for a hyphen. Characters 5 to 8 are verified to be digit characters (48-57). Finally, the numeric values of digits 5, 6, and 7 are extracted, summed, and modulo-10 checked against the 8th digit.

PastPaper.markingScheme

The 9.375 total marks are split across 5 criteria (1.875 marks each):
- Criterion 1: Correct function header and return type definition along with checking if Code is exactly 8 characters.
- Criterion 2: Correctly loop and validate characters 1-3 are uppercase (ASCII 65 to 90).
- Criterion 3: Correctly check character 4 is a hyphen and characters 5-8 are digits (ASCII 48 to 57).
- Criterion 4: Correctly convert characters 5, 6, and 7 to numbers and calculate the sum MOD 10 check digit.
- Criterion 5: Correctly compare the calculated check digit with the 8th character and return TRUE if valid, otherwise FALSE.
PastPaper.question 2 · Algorithm implementation and structural designs
9.375 PastPaper.marks
A software application uses a 2D global array StudentMarks containing 100 rows and 2 columns.
- Column 1 contains the student's name (STRING).
- Column 2 contains the student's test score (STRING, representing an integer value).

Write a pseudocode procedure WritePassedStudents(Filename : STRING, PassMark : INTEGER) to:
1. Open the file specified by Filename in write mode.
2. Search through the global StudentMarks array (index 1 to 100).
3. If a student's score is strictly greater than PassMark, write their name and score to the file in the format "Name: Score" on a new line.
4. Close the file.

Use standard pseudocode file handling commands: OPENFILE FOR WRITE, WRITEFILE , , and CLOSEFILE .
PastPaper.showAnswers

PastPaper.workedSolution

The procedure opens the specified file in write mode, iterates through indices 1 to 100 of the 2D array, converts each score from string to numeric form, checks if it is strictly greater than the pass mark, writes matching records to the file, and finally closes the file.

PastPaper.markingScheme

The 9.375 total marks are split across 5 criteria (1.875 marks each):
- Criterion 1: Correct procedure header definition and local variables declaration.
- Criterion 2: Correct file opening operation for WRITE and closing operation at the end.
- Criterion 3: Correct loop structure to iterate from 1 to 100.
- Criterion 4: Correct logic to extract, convert, and compare the score with the pass mark.
- Criterion 5: Correct writing of student name and score to the file using correct format and concatenation.
PastPaper.question 3 · Algorithm implementation and structural designs
9.375 PastPaper.marks
A queue is implemented as a circular queue in a 1D array Queue[1:12] of strings. The queue is managed by three global variables:
- HeadPointer (INTEGER): stores the index of the element at the front.
- TailPointer (INTEGER): stores the index of the element at the back.
- NumItems (INTEGER): stores the current number of elements in the queue.

Write a pseudocode function Enqueue(NewItem : STRING) RETURNS BOOLEAN to add a new item to the queue. The function should:
1. Check if the queue is full. If it is, return FALSE.
2. Otherwise, update TailPointer to point to the next insertion index (taking into account the circular nature of the queue).
3. Insert NewItem at the updated TailPointer position.
4. Increment NumItems.
5. Return TRUE to indicate successful insertion.
PastPaper.showAnswers

PastPaper.workedSolution

The function checks if NumItems is 12 (the maximum capacity of the array). If so, it returns FALSE. Otherwise, it updates TailPointer in a circular fashion (resetting to 1 if it is currently 12, or incrementing by 1). The item is inserted at the updated TailPointer position, NumItems is incremented, and TRUE is returned.

PastPaper.markingScheme

The 9.375 total marks are split across 5 criteria (1.875 marks each):
- Criterion 1: Correct function header and BOOLEAN return type statement.
- Criterion 2: Correctly checking if the queue is full and returning FALSE immediately.
- Criterion 3: Correctly updating TailPointer to handle circular movement (wrap around from 12 to 1).
- Criterion 4: Correctly writing NewItem into the Queue array at the index specified by TailPointer.
- Criterion 5: Correctly incrementing NumItems and returning TRUE.
PastPaper.question 4 · Algorithm implementation and structural designs
9.375 PastPaper.marks
A recursive function is required to count the occurrences of a target character within a given string.

Using pseudocode, write a recursive function CountChar(Text : STRING, Target : CHAR) RETURNS INTEGER.

The function must use a recursive structure (i.e. call itself) and should not use any loop structures (such as FOR, WHILE, or REPEAT).

You can assume the following built-in functions:
- LENGTH(s : STRING) RETURNS INTEGER
- MID(s : STRING, start : INTEGER, length : INTEGER) RETURNS STRING
PastPaper.showAnswers

PastPaper.workedSolution

The base case is an empty string, which returns 0. If the string is not empty, the first character is extracted using MID(Text, 1, 1) and compared with Target. If they match, the result is 1 plus the recursive call on the rest of the string. If they do not match, the result is simply the recursive call on the rest of the string.

PastPaper.markingScheme

The 9.375 total marks are split across 5 criteria (1.875 marks each):
- Criterion 1: Correct function header, parameter definitions, and INTEGER return type statement.
- Criterion 2: Correct base case condition (checking if length is 0) returning 0.
- Criterion 3: Correctly extracting and checking the first character of the string.
- Criterion 4: Correctly generating the remaining substring using MID(Text, 2, LENGTH(Text) - 1).
- Criterion 5: Correct recursive calls made within both branches of the conditional logic (no loops used).
PastPaper.question 5 · Algorithm implementation and structural designs
9.375 PastPaper.marks
An educational institution stores details of courses using a user-defined record type Course.
The record consists of:
- CourseCode (STRING, e.g., 'CS101')
- Title (STRING, e.g., 'Introduction to Programming')
- MaxStudents (INTEGER, e.g., 30)

An array CourseList is declared globally to store 50 records of type Course (index 1 to 50).

Write pseudocode to:
1. Define the record structure Course.
2. Write a function FindCourse(Code : STRING) RETURNS INTEGER that performs a linear search on CourseList to find the record with a matching CourseCode. If found, return the array index; otherwise, return -1.
PastPaper.showAnswers

PastPaper.workedSolution

First, the record definition for Course is declared with CourseCode, Title, and MaxStudents. The function FindCourse loops through each element of the CourseList array from 1 to 50, checking if the current element's CourseCode matches the argument Code. If a match is found, the index is immediately returned. If the loop completes without a match, -1 is returned.

PastPaper.markingScheme

The 9.375 total marks are split across 5 criteria (1.875 marks each):
- Criterion 1: Correct definition of the composite type Course using TYPE ... ENDTYPE with correct fields and data types.
- Criterion 2: Correct function header FindCourse with parameter and return type declaration.
- Criterion 3: Correct loop structure to traverse index 1 to 50 of CourseList.
- Criterion 4: Correct dot-notation syntax to reference record field CourseList[i].CourseCode.
- Criterion 5: Correct return values for both conditions (index on match, -1 on search failure).
PastPaper.question 6 · Algorithm implementation and structural designs
9.375 PastPaper.marks
A weather station records hourly wind speed measurements in a text file named wind_speeds.txt. Each line of the file contains a single real value representing the wind speed in km/h.

Write a pseudocode procedure SummarizeWindData() that reads the entire file and:
1. Finds and outputs the maximum wind speed recorded.
2. Calculates and outputs the average wind speed.
3. Outputs the total number of readings processed.

If the file is empty, the procedure should display the message 'No readings available'. Assume the file contains valid real numbers, one per line. Use standard pseudocode file handling operations: OPENFILE, READFILE, EOF, and CLOSEFILE.
PastPaper.showAnswers

PastPaper.workedSolution

The procedure opens the file, and checks if it is empty using EOF(). If empty, it outputs a warning. Otherwise, it uses a WHILE NOT EOF() loop to read wind speeds line-by-line, updating count, total speed, and tracking the maximum speed. After closing the file, it outputs the statistics.

PastPaper.markingScheme

The 9.375 total marks are split across 5 criteria (1.875 marks each):
- Criterion 1: Correct procedure header definition and initialization of variables (Count, Total, MaxSpeed).
- Criterion 2: Correct file opening operation and checking for empty file using EOF() before processing.
- Criterion 3: Correct loop structure reading line-by-line until EOF() is reached.
- Criterion 4: Correct data conversion from string to real and updating count, total speed, and tracking the maximum speed.
- Criterion 5: Correct closure of the file and outputting of the statistics (maximum, average, total) with appropriate text prompts.
PastPaper.question 7 · Algorithm implementation and structural designs
9.375 PastPaper.marks
A 1D array InventoryCount contains 30 integer elements representing stock levels. Write a pseudocode procedure BubbleSortDescending() to sort this array in descending order using an optimized bubble sort.

The optimization must ensure that the sorting algorithm terminates immediately if a complete pass is completed without any elements being swapped.

Assume the array InventoryCount is declared globally and contains elements from index 1 to 30.
PastPaper.showAnswers

PastPaper.workedSolution

The procedure implements bubble sort using a REPEAT-UNTIL loop controlled by a Swapped boolean flag and a Limit variable. In each pass, adjacent elements are compared and swapped if they are in ascending order (which sorts the array descending). Limit is decreased by 1 after each pass because the smallest element bubbles to the end. The loop stops if no elements were swapped during a pass.

PastPaper.markingScheme

The 9.375 total marks are split across 5 criteria (1.875 marks each):
- Criterion 1: Correct procedure header and local variable declarations (i, Temp, Limit, Swapped).
- Criterion 2: Correct outer loop (REPEAT...UNTIL or WHILE) controlled by the Swapped flag.
- Criterion 3: Correct inner loop structure iterating up to Limit to avoid redundant comparisons.
- Criterion 4: Correct comparison condition for sorting in descending order (InventoryCount[i] < InventoryCount[i + 1]).
- Criterion 5: Correct swapping of array elements using a temporary variable and correctly managing the Swapped state.
PastPaper.question 8 · Algorithm implementation and structural designs
9.375 PastPaper.marks
A travel agency represents flight passengers using a user-defined record type FlightPassenger:
```
TYPE FlightPassenger
DECLARE Name : STRING
DECLARE SeatNumber : STRING
DECLARE BaggageWeight : REAL
DECLARE IsPriority : BOOLEAN
ENDTYPE
```
An array Manifest contains 150 elements of type FlightPassenger (index 1 to 150).

Write a pseudocode function ProcessFlight(Limit : REAL) RETURNS REAL that performs the following tasks:
1. Calculates and returns the total weight of baggage for all passengers whose BaggageWeight is strictly greater than Limit.
2. Counts how many passengers with IsPriority = TRUE have BaggageWeight greater than Limit. This count should be outputted directly to the screen with a suitable message.
PastPaper.showAnswers

PastPaper.workedSolution

The function initializes variables to track total baggage weight and priority counts. It loops through all 150 elements in the Manifest array. Inside the loop, it checks if a passenger's BaggageWeight exceeds the specified Limit. If it does, their baggage weight is added to the running total, and if they are also priority passengers, the count is incremented. The count is outputted at the end, and the total weight is returned.

PastPaper.markingScheme

The 9.375 total marks are split across 5 criteria (1.875 marks each):
- Criterion 1: Correct function header and return type definition (RETURNS REAL) with correct variable initialization.
- Criterion 2: Correct loop structure from 1 to 150 to iterate through Manifest.
- Criterion 3: Correct record field access syntax (Manifest[i].BaggageWeight) and comparison with Limit.
- Criterion 4: Correct logic to accumulate total weight and count priority passengers under the criteria conditions.
- Criterion 5: Correct screen output format of the priority count and return statement for TotalWeight.

PastPaper.sampleCTATitle

PastPaper.sampleCTADescription

PastPaper.sampleStickyMessage

PastPaper.stickyCtaText