A venue ticketing system issues membership pass codes using a specific format.
The format of each pass code is structured as follows:
-).-).-).Example valid pass codes:
G-WEMB-CON-1024S-O2AR-SPO-0452B-NECB-EXH-9182Assume a variable named pass_code stores one of these valid codes as a string.
Construct an expression, using string slicing or indexing, to extract the 4-character venue code from pass_code.
44 exam-style questions on Edexcel GCSE Computer Science Data types and structures, covering Primitive and structured data types, Using variables and constants, and Manipulating strings. Each one has a worked solution and a mark scheme showing where the marks go.