Skip to main content
A-LevelComputer ScienceProgramming Fundamentals and Data StructuresOct/Nov 2023Paper 4 Q116 Marks

This iterative pseudocode algorithm for the function IterativeVowels() takes a string as a parameter and counts the number of lower-case vowels in this string. The vowels are the letters a, e, i, o and u. FUNCTION IterativeVowels(Value : STRING) RETURNS INTEGER DECLARE Total : INTEGER DECLARE LengthString : INTEGER DECLARE FirstCharacter : CHAR Total ← 0 LengthString ← LENGTH(Value) FOR X ← 0 TO LengthString – 1 FirstCharacter ← MID(Value, 0, 1) IF FirstCharacter = 'a' OR FirstCharacter = 'e' OR FirstCharacter = 'i' OR FirstCharacter = 'o' OR FirstCharacter = 'u' THEN Total ← Total + 1 ENDIF Value ← MID(Value, 1, LENGTH(Value)–1) NEXT X RETURN Total ENDFUNCTION The pseudocode function MID(X, Y, Z) returns Z number of characters from string X, starting at the character in position Y. The first character in a string is in position 0, for example: MID("computer", 0, 3) returns "com" The pseudocode function LENGTH(X) returns the number of characters in the string X, for example: LENGTH("computer") returns 8

✓ Correct Answer

The correct answer is . This question tests the candidate's understanding of programming fundamentals and data structures within the Computer Sciencesyllabus. The examiner's mark scheme requires...

📋 Examiner Report & Trap Analysis

Common mistake: 62% of candidates selected the distractor because they confused... The examiner specifically designed this question to test whether students can differentiate between... To secure full marks, candidates must demonstrate...

🔒

Unlock the Examiner's Answer

Sign up for free to reveal the correct answer, the official mark scheme breakdown, and the examiner trap analysis for this question.

Sign Up Free to Unlock →

Join thousands of Cambridge students already using Oracle Prep

About This A-Level Computer Science Question

This structured question appeared in the Cambridge A-Level Computer Science (9618) Oct/Nov 2023 examination, Paper 4 Variant 1. It tests the topic of Programming Fundamentals and Data Structures and is worth 16 marks.

Oracle Prep provides AI-powered practice for all Cambridge O-Level and A-Level subjects. Our platform includes topic predictions with 87.7% accuracy, AI essay grading, and a comprehensive question bank spanning 25 years of past papers.

© 2026 Oracle Prep — The AI-Powered Cambridge Exam Engine