Skip to main content
Edexcel IGCSEComputer ScienceGeneral Applications4 Marks

Consider the following pseudocode: ```pseudocode DECLARE num1 : INTEGER DECLARE num2 : INTEGER DECLARE result : INTEGER INPUT num1 INPUT num2 IF num1 > num2 THEN result = num1 - num2 ELSE result = num2 - num1 END IF OUTPUT result ```

  1. (a)State the purpose of the `DECLARE` statements.[1]
  2. (b)Identify the output if `num1` is 7 and `num2` is 12.[1]
  3. (c)Describe what this algorithm calculates.[2]

Mark scheme

Marking points from the official mark scheme. The mark or mark type is shown in brackets.

  1. (a) B1 for 'To declare / create variables' or 'To assign a data type to variables' or 'To reserve memory for variables'.
  2. (b) B1 for '5'.
  3. (c) B1 for stating 'It calculates the difference between two numbers'.
  4. B1 for further qualification, e.g., 'It calculates the absolute / positive difference between two numbers' or 'It calculates the magnitude of the difference regardless of order'.

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
General Applications, Edexcel IGCSE Computer Science. Structured question, 4 marks.

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