In AP Computer Science Principles, an index is the natural number that identifies an element's position in a list or string (EK AAP-1.C.3). On the AP Exam Reference Sheet, indices start at 1, so aList[1] is the FIRST element, unlike Python, which starts at 0.
An index is the position number assigned to each element in an ordered sequence, like a list or a string. The CED puts it plainly: a list is an ordered sequence of elements (EK AAP-1.C.1), every element gets a unique index (EK AAP-1.C.2), and an index is the standard way to reference those elements using natural numbers (EK AAP-1.C.3). Think of a list as a row of numbered lockers. The index is the locker number, and the element is whatever is stored inside.
Here's the part that trips people up. The AP Exam's pseudocode uses 1-based indexing, so in scores ← [85, 92, 78, 90, 88], the expression scores[1] gives you 85. Python (and most real languages) uses 0-based indexing, where scores[0] is 85 and scores[2] is 78. Since strings are also ordered sequences (of characters, per EK AAP-1.C.4), indexing works on them too, which is how slicing and substrings happen. Indices aren't permanent labels either. When you insert or remove an element, every element after that spot shifts and gets a new index.
Indexing lives in Topic 3.2 (Data Abstraction) in Unit 3: Algorithms and Programming, supporting learning objective AP Comp Sci P 3.2.A (represent a list or string using a variable). It's also the mechanical foundation for 3.2.B, because data abstraction only manages complexity if you can actually get values in and out of the collection you named. Practically, indexing is everywhere in Unit 3. Traversing a list with a loop, searching for a value, building a substring, and updating an element all run on index access. If you misread whether a question is using AP pseudocode (starts at 1) or Python (starts at 0), you'll pick the cleanly wrong answer choice that the test writers put there on purpose.
Keep studying AP Computer Science Principles Unit K8nK3Mvi5Zdodp18
Managing Complexity with Data Abstraction (Unit 3)
A list with indices is the simplest data abstraction on the exam. You give a whole collection one name, then use an index to reach any single piece. That separation between the name and the details is exactly what EK AAP-1.D.2 means by managing complexity.
Substring (Unit 3)
Substrings are just indexing applied to strings. Pulling "sauce" out of "applesauce" means specifying a range of character positions, so every slicing question is secretly an index question.
Algorithm (Unit 3)
List-processing algorithms like linear search work by stepping through indices one at a time, often with a loop variable that IS the index. When you trace a loop on the exam, you're really tracking how an index changes.
Linked List (beyond the CED)
A useful contrast for MCQs about limitations. Index-based access assumes elements sit in numbered positions, but a linked list has no indices at all; you reach elements by following links. Knowing this helps you reason about why index access has tradeoffs.
Index questions show up as MCQs in a few predictable flavors. First, straight evaluation: given a list like [85, 92, 78, 90, 88], what does scores[2] return? Your answer depends entirely on whether it's AP pseudocode (92, since indexing starts at 1) or Python (78, starting at 0), so check the syntax before anything else. Second, mutation effects: after scores.remove(78) runs, every element after the removed one shifts down and gets a new index, and questions test whether you track that shift. Third, string slicing, where you pick the index range that extracts a target substring. Fourth, conceptual limitations of index-based access, like what happens with out-of-range indices. The Create Performance Task also requires you to use a list, and you'll almost certainly access it by index inside a loop, so be ready to explain that code in your written responses.
The element is the value; the index is its position number. In [85, 92, 78, 90, 88], 92 is an element, and (in AP pseudocode) 2 is its index. Questions exploit this constantly, asking for 'the element at index 2' versus 'the index of element 92.' Read which one the stem wants before you answer, and remember AP pseudocode counts from 1 while Python counts from 0.
An index is the natural number that identifies an element's position in a list or string, per EK AAP-1.C.3.
AP Exam pseudocode is 1-based, so aList[1] is the first element, while Python is 0-based, so aList[0] is the first element.
The index is the position and the element is the value stored at that position; don't swap them when reading a question stem.
Removing or inserting an element shifts the indices of everything after it, which changes what later index expressions return.
Strings are ordered sequences of characters, so indexing and slicing work on them the same way they work on lists.
Accessing an index that doesn't exist (like index 6 in a 5-element list) causes an out-of-range error, a common MCQ trap.
An index is the natural number that marks each element's position in a list or string (EK AAP-1.C.3). It's how your code refers to one specific value inside a collection, like scores[3] for the third element in AP pseudocode.
AP Exam pseudocode starts at 1, so the first element of aList is aList[1]. Python starts at 0. On exam day, check whether the question uses AP pseudocode or Python syntax before evaluating any index expression.
The element is the actual value stored in the list; the index is the number telling you where it sits. In [85, 92, 78, 90, 88], the element 78 is at index 3 in AP pseudocode (or index 2 in Python).
Yes. After scores.remove(78) runs on [85, 92, 78, 90, 88], every element after 78 shifts down one position and gets a new index, so 90 and 88 each move back by one. Exam questions love testing whether you track this shift.
You get an out-of-range error because no element exists at that position. For a 5-element list in AP pseudocode, valid indices are 1 through 5, so aList[6] (or aList[0]) fails.