What does index mean?
The position of an item in a list or a string, counting from 0: the first item is at index 0, the second at index 1.
In a lesson
Each item of
boardis itself a list: a row.board[1]is the second row, andboard[1][2]is the item in column 2 of that row, which is 6. Read the two indexes as row, then column.
Learn it
- Taught in F3.5 Two-dimensional arrays Strings, lists and records, GCSE
Used in
- F3.1 String handling
- F3.3 Lists: one-dimensional arrays
- F3.4 Iterating over a list
- F3.6 Records
- F3.7 Random numbers
- F5.5 Linear search
- F5.6 Binary search
- F8.3 Hexadecimal
- F10.7 Protocols
- F13.7 Where marks are lost
and 33 more lessons.
Do the lesson in the simulator