Unit 2 Lab 2
Making Lists
In this lab, you will create tools for storing and accessing data.
Shopping List App
Vocabulary
Click each word to view the definition.
Element
An element is another name for an item in a list. (If the same value is in the list twice, that counts as two different elements.) Each element has a unique index (position) in the list.
Planning a Quiz App
Vocabulary
Click each word to view the definition.
Sublist
A sublist is a list as an item of another list.
Data Type
A data type is what kind of data something is (number, text string, list, etc.).
Primitive Data Types
Each programming language provides some primitive data types (data types that are built-in).
Abstract Data Type
An abstract data type (or ADT) is a custom data type that's meaningful to your program. It's not built into the language; you develop it as you code.
Constructor
A constructor constructs one example of the data structure.
Selectors
The selectors select one piece of the data structure.
Data Abstraction
Data abstraction is the creation and use of abstract data types in a program.
Self-Check
Unit 2 Lab 2: Planning a Quiz App
Checking Each Quiz Answer
Vocabulary
Click each word to view the definition.
Composition
Using the result from item as the input to address from contact is called composition of functions.
Traversing
Traversing a list means looking at each item of the list. For each is iterative (that is, it's repetitive, like for, which can also traverse a list). But unlike for, for each traverses the list without using index numbers.