The function LENGTH(Phrase) calculates the length of a string Phrase
- (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]
- (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] (a) Storing string in Phrase: `Phrase ← "The beginning is the most important part"`
- [1] (a) Correct use of LENGTH function: `OUTPUT LENGTH(Phrase)`
- [1] (a) Correct use of UCASE function: `OUTPUT UCASE(Phrase)`
- [1] (b) Output for LENGTH: 40
- [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 →