Past-paper question · 2011 October-November · Paper 31 · Q10(b)

Question 10(b) 2011 · October-November · Paper 31 · 4 marks

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

Official answer for Question 10

Part (b)

Part (b)

✓
variable-identifier
✓
non-zero-digit
✓
letter
✓
digit
✓
Mark Points:
  • Only one entry and one exit point used
  • Order correct (non-zero-digit, letter, digit)
  • Loop around letter to create group
  • Loop around digit to create two options one to include final digit, one to omit final digit
✓
(1 per -, max 4)
[4]
✓
© University of Cambridge International Examinations 2011

Mark scheme 9691_w11_ms_31.pdf →

Show text version of question

Question 10

Part (b)

Question 10

A variable identifier in a certain programming language is defined in BNF (Backus-Naur For

form) as: Examiner's Use

<non-zero-digit> ::= 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 <digit> ::= 0 | <non-zero-digit> <letter> ::= A | B | C | x | y | z <group> ::= <letter> | <letter><group> <variable-identifier> ::= <non-zero-digit><group><digit> | <non-zero-digit><group>

Part (b)

Using only the terms:

  • non-zero-digit
  • digit
  • letter
  • variable-identifier

draw a syntax diagram to show the definition of a variable identifier.

[4]

reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the publisher will be pleased to make amends at the earliest possible opportunity.

University of Cambridge International Examinations is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of University of Cambridge Local Examinations Syndicate (UCLES), which is itself a department of the University of Cambridge.

Topic relevance

Why this question appears here

71% assigned-topic match · Programming › Constructs

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 9691_w11_qp_31.pdf

Keep practising this topic