2210/22/M/J/24 question 7: worked solution (May/June 2024, paper 22)
Show as plain textHide plain text
Cambridge O Level Computer Science 2210 · 8.1 Programming concepts Worked solution from the Programming Paper 2 Algorithms, Programming and Logic booklet, Part 1 of 3. Q32 2210/22/M/J/24 original Q7 Structured · 6 marks Worked solution (a) Assignment uses ←, selection is the IF, iteration is the FOR loop. Assignment statement: any of 01 , 02 , 06 or 10 [1] Selection statement: 04 (or 08, or 04 to 07) [1] Iteration statement: 03 (or 12, or 03 to 12) [1] (b) Check each line against what the algorithm should do. Write any three of these (line number and correction): Line 04 : < should be > (to find the maximum) [1] Line 08 : Count should be Counter [1] Line 11 : ENDWHILE should be ENDIF [1] KEY IDEA Test each IF against its purpose, match each variable name, and close every structure with its own end keyword. TOTAL 6 marks Official mark scheme VIDEO ▶ Topic lesson A lesson on this topic · by Mr Bulmer's Learning Zone. Tap the picture to open it on YouTube.