Worked solution from the System Software Paper 3 Advanced Theory booklet, Part 2 of 2.
JJ90: the second character is J, which is an upper. The second character must be a lower or a digit [1]
The second and third characters are each a lower or a digit. Write:
<upper> ::= J | K | L | V | X | Z [1]
<passcode> ::= <upper><lower><lower><digit> |
<upper><lower><digit><digit> |
<upper><digit><lower><digit> |
<upper><digit><digit><digit>Any two correct options for <passcode> [1]
The other two options correct [1]
Another correct way: <passcode> ::= <upper><middle><middle><digit> with <middle> ::= <lower> | <digit>. This earns the same two marks.
In the diagram, add an upper box as a third choice in the box for the third character, with its own entry and exit lines. Then add a loop line from after the final digit back to just before it, so the final digit can repeat.
upper box in the correct place with correct connections [1]
Correct repetition arrow round the final digit [1]
▶ Topic lesson
A lesson on this topic · by Craig'n'Dave. Tap the picture to open it on YouTube.
Solutions follow the official Cambridge mark schemes; marks are shown in grey. Videos are from other YouTube channels. Paper codes read component / series / year: M/J = May/June, O/N = October/November. Past-paper questions © UCLES, reproduced for classroom practice.