One-dimensional arrays
A single row of items of the same data type, stored under one name. Each item is found by its index number, starting at 0. In Python, a list is used as an array.
Understanding One-dimensional arrays in VCE Data Analytics U3O2
What it does: scores[0] uses index 0 to get the first item in the array. All three elements are strings, so this list follows the array rule of one data type for every element. Indexes start at 0, so an array with 5 items uses indexes 0, 1, 2, 3 and 4. range(len(marks)) gives indexes 0 up to the last one. Adding 1 goes past the end and causes an IndexError. Square brackets are used to access an item by index. Round brackets would try to call prices as a function. Arrays are planned with a fixed number of elements. Python lists can change size, but when used as an array we treat the size as fixed.
Common mistakes: An array (list) element is found with square brackets, not round brackets. It should be print(scores[0]). The items in a Python list are separated by commas, not semicolons. It should be temps = [21, 25, 19, 30].
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 32–75) and word search (Modules 3–146).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
one-dimensional arrayFill in the Blanks
Spot the Error
Student with a class code? Join your class →