LessonPort Python Data Abstraction LabAP Computer Science Principles
SCORE0STREAK0

DATA ABSTRACTION · PYTHON

One name.
Many related values.

A data abstraction groups related values so a program can store, access, and process them as one meaningful collection. In Python, lists and strings are common data abstractions.

Learning target Create and use Python lists, explain zero-based indexing, and justify how a collection manages complexity.

PART 1 · BUILD A COLLECTION

Turn related values into one list

Each tile is one value. Python stores the entire sequence under the single name planets.

LIVE PYTHONplanets = ['Orion', 'Luna', 'Nova']
index 0Orion
index 1Luna
index 2Nova

The variable planets refers to the whole list. Each value inside it is an item with its own index.