9618/32/M/J/25 question 9: worked solution (May/June 2025, paper 32)
Show as plain textHide plain text
Cambridge A2 Level Computer Science 9618 · 16.2 Translation Software Worked solution from the System Software Paper 3 Advanced Theory booklet, Part 2 of 2. Q35 9618/32/M/J/25 original Q9 Structured · 6 marks Worked solution (a) Compare 9K with the variable diagram. A variable must begin with a letter , but 9K begins with a digit [1] (b) List the choices in the operator diagram. <operator> ::= + | - | * | / | ^ [1] (c) The diagram already shows variable and =. After the = circle add a variable box, then an operator box, then a second variable box. Draw a line from after the last variable box back to before the operator box, so the operator and variable can be repeated. Two variable boxes added after the = circle [1] One operator box added, and all boxes in the correct order [1] Connections, arrows and the return loop correct, with no extra boxes [1] (d) The variable must start with a letter, then have any letters or digits, and be at least four characters long. Write one example, such as: AC768 [1] KEY IDEA Read the syntax diagram as rules: where it starts, what can follow, and where a loop lets a part repeat. TOTAL 6 marks Official mark scheme VIDEO ▶ Topic lesson A lesson on this topic · by Craig'n'Dave. Tap the picture to open it on YouTube.