Skip to main content
O-LevelComputer ScienceProgramming2210/21 · May/June 2023 · Q85 Marks

The function LENGTH(Phrase) calculates the length of a string Phrase

  1. (a)Write the pseudocode statements to: • store the string "The beginning is the most important part" in Phrase • calculate and output the length of the string • output the string in upper case.[3]
  2. (b)Write the output your pseudocode should produce.[2]

Mark scheme

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

  1. [1] (a) Storing string in Phrase: `Phrase ← "The beginning is the most important part"`
  2. [1] (a) Correct use of LENGTH function: `OUTPUT LENGTH(Phrase)`
  3. [1] (a) Correct use of UCASE function: `OUTPUT UCASE(Phrase)`
  4. [1] (b) Output for LENGTH: 40
  5. [1] (b) Output for UCASE: THE BEGINNING IS THE MOST IMPORTANT PART

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, O-Level Computer Science (syllabus 2210). Structured question, 5 marks.
Source
O-Level Computer Science, May/June 2023 Paper 2 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