Skip to main content
A-LevelComputer ScienceProgramming9618/31 · Oct/Nov 2023 · Q88 Marks

A pseudocode algorithm finds a customer account record in a random file and outputs it. The records are stored using the user-defined data type TAccount. TYPE TAccount DECLARE AccountNumber : INTEGER DECLARE LastName : STRING DECLARE FirstName : STRING DECLARE Address : STRING DECLARE ContactNumber : STRING ENDTYPE

  1. (a)Complete the file handling pseudocode. The function Hash() takes the customer account number as a parameter, calculates and returns the hash value. DECLARE Customer : TAccount DECLARE Location : INTEGER DECLARE AccountFile : STRING - "AccountRecords.dat" AccountFile OUTPUT "Please enter an account number" INPUT Customer.AccountNumber Location ← Hash ( .) SEEK , Location AccountFile, OUTPUT Customer // output customer record CLOSEFILE AccountFile[5]
  2. (b)Define the term exception handling.[1]
  3. (c)State two possible causes of an exception.[2]

Mark scheme

Marking points from the official mark scheme (Oct/Nov 2023). The mark or mark type is shown in brackets.

  1. [1] One mark for each correctly completed line (Max 5)
  2. [1] One mark for correct definition (Exception handling is the process of) responding to an unexpected event when the program is running so it does not halt unexpectedly
  3. [1] One mark per mark point (Max 2), for example: Programming errors
  4. [1] User errors
  5. [1] Hardware failure
  6. [1] Runtime errors

Write your answer and get it marked

On Oracle Prep you can write or photograph your own answer and have it marked by AI against this mark scheme, with feedback on what you missed.

Sign up free →

About this question

Topic
Programming, A-Level Computer Science (syllabus 9618). Structured question, 8 marks.
Source
A-Level Computer Science, Oct/Nov 2023 Paper 3 Variant 1, question 8.

Questions and mark schemes are from past examination papers and remain the copyright of the exam board. How Oracle Prep builds its content

Related Computer Science questions

© 2026 Oracle Prep