Past-paper question · 2015 May-June · Paper 33 · Q1(b)

Question 1(b) 2015 · May-June · Paper 33 · 6 marks

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

Official answer for Question 1

Part (b)

Part (b)

✓
<assignmentstatement> ::=
✓
<variable> := <variable><operator><number>
✓
1 + 1
✓
<variable> ::= <letter><number>

Question 1

✓
<number> ::= <digit>| <digit><number>
✓
1 + 1
✓
<letter> ::= A|B|C

Question 1

✓
<digit> ::= 1|2|3|4|5
✓
<operator> ::= +|-|*|/

Mark scheme 9608_s15_ms_33.pdf →

Show text version of question

Question 1

Part (b)

Question 1

The following syntax diagrams, for a particular programming language, show the syntax of: • an assignment statement • a variable • a number • a letter • a digit • an operator Assignment statement Variable := Variable Operator Number Variable Letter Number Number Digit Letter A B C Digit

Question 1

Question 2

Question 3

Question 4

Question 5

Operator + – /

Question 3

Part (b)

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

<letter> has been done for you. <assignmentstatement> ::= ................................................................................................................................................... <variable> ::= ................................................................................................................................................... <number> ::= ................................................................................................................................................... <letter> ::= A | B | C <digit> ::= ................................................................................................................................................... <operator> ::= ...................................................................................................................................................

[6]

Question 4

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_s15_qp_33.pdf

Keep practising this topic