2210/22/O/N/22 question 6: worked solution (October/November 2022, paper 22)

Show as plain text

Cambridge O Level Computer Science 2210 · 7.7 Trace tables Worked solution from the Algorithm design and problem-solving Paper 2 Algorithms, Programming and Logic booklet, Part 6 of 8. Q53 2210/22/O/N/22 original Q6 Structured · 5 marks Worked solution Follow the flowchart. Numbers below 100 or above 999 skip straight back to the start of the loop. Counter goes up each time round and the loop stops when Counter is more than 7. Counter Number Hundreds Temp Tens Units OUTPUT 0 1 97 2 876 8 76 7 6 Hundreds: 8 Tens: 7 Units: 6 3 4320 4 606 6 6 0 6 Hundreds: 6 Tens: 0 Units: 6 5 9875 6 42 7 124 1 24 2 4 Hundreds: 1 Tens: 2 Units: 4 8 Counter and Number columns correct [1] Hundreds column correct [1] Temp and Tens columns correct [1] Units column correct [1] OUTPUT column correct [1] KEY IDEA Only numbers from 100 to 999 are split up; DIV gives the whole part and MOD gives the remainder. TOTAL 5 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.