Community resourceWorksheet
1CP2-CT-4.2 Two-dimensional lists and indexing
Part 2 of 7 · 1CP2-CT-4 · Structures, validation and search
The two-dimensional worksheet, selecting a row first and a field second.
Students will:
- read a value using a row index and a field index
- predict the exact outputs of a listing that indexes a table
- create, read and update a two-dimensional structure
- state the greatest valid indexes for a given shape
- explain what makes a structure a record
Inside: 6 explanation cells, 3 multiple-choice questions, 1 Python task, 1 fill-in-the-blanks cell and 2 written answers. 14 marks, about 45 minutes.
Series: 1CP2-CT-4 · Structures, validation and search, part 2 of 7.
Shared by Coding PathwayVerified teacher
- 13 cells
- About 45 minutes
- CC BY-SA 4.0
- Shared 17 Aug 2026
Preview
The whole resource, exactly as a class sees it. Answers and marking are held back.
Two-dimensional lists and indexing
A one-dimensional list has one index. A two-dimensional structure organises values as rows and fields, so two indexes identify one value.
Pearson distinguishes an array, whose items share a data type, from a record, whose named or positioned fields may use different types. Python lists are the practical representation for both.
1. Select a row, then a field
The first index chooses a row. The second chooses a field within that row. Both begin at zero: records[1][2] means row 1, then field 2.
PLS v6 uses rectangular structures: every row has the same number of fields. Do not build ragged rows of different lengths for core solutions.
records[row][field], the gap 1 index selects a row and the gap 2 index selects a field. Both begin at gap 3.- 0
- 1
- first
- second
- third
Using the diagram, which expression reads Green?
- Arecords[0][1]
- Brecords[1][1]
- Crecords[1][2]
- Drecords[2][1]
2. Read before running
stock = [["P10", "Pen", 12],
["P11", "Pad", 7],
["P12", "File", 9]]
print(stock[2][1])
print(stock[0][2])
Which exact outputs are produced?
- A`P12` then `12`
- B`File` then `12`
- C`File` then `7`
- D`Pad` then `9`
Explain why stock[2][1] is File rather than P12.
Name the row selected by the first index and field selected by the second.
Students type their answer here.
3. Create, read and update
Create results with three rectangular records: ["Ari", 14], ["Bo", 17], ["Cy", 12]. Store Bo's score in bo_score. Change Cy's score to 15. Print bo_score and the updated Cy record on separate lines.
# Create results, read Bo's score, update Cy's score and print.
4. Control row and field boundaries
For len(records) rows, the final positive row index is len(records) - 1. Field boundaries depend on the chosen row, but core Edexcel structures are rectangular, so len(records[0]) gives the common field count.
For a 3-row by 4-field structure, explain why table[3][1] fails and give the greatest valid positive indexes for a value.
State row and field boundaries separately.
Students type their answer here.
Which structure is best described as a record?
- AA row containing name, age and Boolean membership status
- BA list containing five integer temperatures
- CA string containing six characters
- DA range generating the numbers 0 to 4
Route forward
You can locate and update one field safely. Next you will use nested loops to visit every row and every field.