Skip to content
MathsGenie logo
Open app

Course home

  1. IGCSE
  2. Computer Science Edexcel
  3. Question bank

Develop code

EasyMediumHard
123456789101112131415161718192021222324252627
Question 26

Maya is a software developer creating a library book cataloguing system. Each book has an eleven-character cataloguing code.

Each code consists of three parts as described in the reference tables below.

HIST382910Y and FICT472019N are valid codes.

All codes need to be validated.

Complete the table to show two additional validation tests.

For each test, give one example of erroneous data. The example that you give should fail only that test.

Code Format Rules

PartDescription
Characters 1 to 4Uppercase letters
Characters 5 to 10Digits between 0 and 9 inclusive
Character 11'Y' or 'N' indicating if it is a physical format

Validation Tests Table

Validation testErroneous data
Is the last character 'Y' or 'N'?HIST382910Z
[4]

Develop code Questions

  1. IGCSE
  2. /Computer Science
  3. /Develop code