Skip to main content
A-LevelComputer ScienceProgramming9618/21 · May/June 2024 · Q111 Marks

An algorithm is developed in pseudocode before being coded in a programming language.

  1. (a)The following table shows four valid pseudocode assignment statements. Complete the table by giving an appropriate data type to declare each of the variables A, B, C and D. Assignment statement Data type A ← LEFT(MyName, 1) B ← Total * 2 C ← INT(ItemCost) / 3 D ← "Odd OR Even"[4]
  2. (b)Other variables in the program have example values as shown: Variable Value Sorted False Tries 9 ID "ZGAC001" Complete the table by evaluating each expression, using the example values. Expression Evaluates to Tries < 10 AND NOT Sorted Tries MOD 4 TO_LOWER(MID(ID, 3, 1)) LENGTH(ID & "xx") >= Tries[4]
  3. (c)(i)The variable names A, B, C and D in part (a) are not good programming practice. (i) State why these variable names are not suitable.[1]
  4. (c)(ii)(ii) Identify one problem that these variable names might cause.[1]
  5. (c)(iii)(iii) The choice of suitable variable names is one example of good programming practice. Give one other example.[1]

Mark scheme

Marking points from the official mark scheme (May/June 2024). The mark or mark type is shown in brackets.

  1. [4] One mark per row
  2. CHAR / STRING
  3. INTEGER / REAL
  4. REAL
  5. STRING
  6. [4] One mark per row
  7. TRUE
  8. 1
  9. 'a' // "a"
  10. TRUE
  11. [1] The names do not reflect / indicate the purpose of the variable // the names are not meaningful
  12. [1] They make the program more difficult to understand / debug / maintain
  13. [1] One mark from:
  14. • Indentation / use of white space
  15. • Capitalisation of keywords
  16. • Use of comments
  17. • Use of modular programming
  18. • Use of local variables
  19. Note: max 1 mark

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, 11 marks.
Source
A-Level Computer Science, May/June 2024 Paper 2 Variant 1, question 1.

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