Input/output

EasyMediumHard
123456789101112131415
Question 14
Easy

A school library uses a specific coding system to generate unique barcodes for cataloguing books.

Book Code Format

  • The code begins with the character 'F' (Fiction) or 'N' (Non-fiction).
  • The next field is a three-character genre category (e.g., 'SCI' for Science, 'HIS' for History).
  • The next field is a two-letter publisher code.
  • The next field is a four-digit publication year.
  • The last field is a three-digit sequence number.

Valid book codes:

  • F-SCI-HC-2021-002
  • N-HIS-OX-2018-145
  • F-ROM-PE-2023-012

Give one validation test that could be used to check the publisher code in the book code.

[1]

Input/output Questions

  1. GCSE
  2. /Computer Science
  3. /Input/output