Past-paper question · 2021 May-June · Paper 33 · Q5(b)

Question 5(b) 2021 · May-June · Paper 33 · 5 marks

Original past-paper question for 5(B)
Original past-paper question for 5(B)
Reveal official mark-scheme answer Official mark-scheme answer for 5(B)

Official answer for Question 5

Part (b)

Question 5

✓
<assignment_statement> ::=

Question 1

✓
<variable> = <variable><operator><variable>

Question 1

✓
|<variable> = <variable><operator><unsigned_integer>

Question 1

✓
<variable> ::= <letter><letter>

Question 1

✓
<unsigned_integer> ::= <digit>|<digit><digit>
✓
<digit>::= 1 | 2 | 3

Question 1

✓
<operator> ::= + | - | *
✓
9608/33
✓
Cambridge International AS & A Level – Mark Scheme
✓
May/June 2021
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 9608_s21_ms_33.pdf →

Show text version of question

Question 5

Part (b)

Question 5

The following syntax diagrams for a programming language show the syntax of:

  • an assignment statement
  • a variable
  • an unsigned integer
  • a digit
  • a letter
  • an operator

assignment statement

variable = variable operator variable

unsigned integer

variable

letter letter

unsigned integer

digit digit

letter operator digit X + 1

Y – 2

Z * 3

Part (b)

Complete the Backus-Naur Form (BNF) for the syntax diagrams shown.

<letter> has been completed for you.

<letter> ::= X|Y|Z

<assignment_statement> ::=

...................................................................................................................................................

<variable> ::=

...................................................................................................................................................

<digit> ::=

...................................................................................................................................................

<unsigned_integer> ::=

...................................................................................................................................................

<operator> ::=

...................................................................................................................................................

[5]
Topic relevance

Why this question appears here

71% assigned-topic match · Programming › Programming basics

Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.

Permanent source page: Educate A Change · From 9608_s21_qp_33.pdf

Keep practising this topic