11 mark
Which one of the following best describes abstraction?
total ← 0FOR i ← 1 TO 5 IF i MOD 2 = 1 THEN total ← total + i ENDIFENDFOROUTPUT totalState the value of total at the end of each iteration of the FOR loop, and the final output.SUBROUTINE area(w, h) RETURN w * hENDSUBROUTINEIdentify one parameter used in the subroutine.n ← 13count ← 0WHILE n ≠ 1 IF n MOD 2 = 0 THEN n ← n DIV 2 ELSE n ← 3 * n + 1 ENDIF count ← count + 1ENDWHILEOUTPUT countAnswer every question to finish (33 left), or finish when the time’s up.
This paper is written by Plasmo in the style of the AQA GCSE Computer Science exam. It is not a past paper and is not produced or endorsed by the exam board.