An algorithm has been written in pseudocode to check that a password meets a set of rules. 01 OUTPUT "Please enter password " 02 INPUT Password 03 Accept ← TRUE 04 IF LENGTH(Password) < 8 OR LENGTH(Password) > 20 05 THEN 06 Accept ← FALSE 07 ENDIF 08 IF LCASE(Password) = Password OR UCASE(Password) = Password 09 THEN 10 Accept ← FALSE 11 ENDIF 12 Index ← 1 13 Found ← FALSE 14 WHILE NOT Found AND Accept AND Index < LENGTH(Password) 15 IF SUBSTRING(Password, Index, 1) = '!' 16 THEN 17 Found ← TRUE 18 ENDIF 19 Index ← Index + 1 20 ENDWHILE 21 IF NOT Found 22 THEN 23 Accept ← FALSE 24 ENDIF 25 IF Accept 26 THEN 27 OUTPUT "Accepted" 28 ELSE 29 OUTPUT "Rejected" 30 ENDIF
📋 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...
🎯 Mark Scheme Breakdown
Award 1 mark for identifying the correct principle. Award 1 mark for showing clear working. Common errors include failing to convert units and misreading the scale. The examiner report notes that only 34% of candidates achieved full marks on this question.
Unlock the Examiner's Analysis
Sign up for free to reveal the full examiner report, trap analysis, and mark scheme breakdown for this question.
Sign Up Free to Unlock →Join thousands of Cambridge students already using Oracle Prep