Deck 8: Lists and Arrays

Full screen (f)
exit full mode
Question
Which of the following items can be stored in a list?

A) numbers
B) strings
C) objects
D) Boolean values
E) All of these
Use Space or
up arrow
down arrow
to flip the card.
Question
Which instruction is used to step through each element of a list?

A) Do together
B) For all in order
C) For all together
D) loop
E) None of these
Question
Given a list, animalList, that contains the objects: cat, dog, tiger, lion; the function ith item from list, given an index of 1, would return which object?

A) cat
B) dog
C) tiger
D) lion
E) None of these
Question
What is the term for the section of the create new variable dialog box used to add items to a list?

A) Collection Editor
B) Details Panel
C) List Editor
D) Object Editor
E) None of these
Question
Items may be added to a list and removed from a list while the world is running.
Question
The list automatically expands as items are added to it, and it automatically shrinks as items are removed from it.
Question
What is the index of the first position in an array that contains 10 items?

A) 0
B) 1
C) 9
D) 10
E) None of these
Question
What is the general term for a mechanism for storing and organizing data?

A) array
B) index
C) list
D) data structure
E) None of these
Question
What is the function used to randomly choose an element from an array?

A) first item from list
B) ith item from list
C) random item from list
D) random number
E) None of these
Question
Given a list, animalList, that contains the objects: cat, dog, tiger, lion; the function first item from list would return which object?

A) cat
B) dog
C) tiger
D) lion
E) None of these
Question
What is the function used to choose an element from a list at the specified index number?

A) first item from list
B) ith item from list
C) last item from list
D) random item from list
E) None of these
Question
Which instruction is used when you want all of the elements of a list to execute the same instruction(s) simultaneously?

A) Do together
B) For all in order
C) For all together
D) loop
E) None of these
Question
Given an array, animalArray, that contains the objects: cat, dog, tiger, lion; item 3 from animalArray would refer to which object?

A) cat
B) dog
C) tiger
D) lion
E) None of these
Question
What is the term for a stored group of items that has a fixed size so new items cannot be added while the world is running?

A) array
B) index
C) list
D) data structure
E) None of these
Question
What is the term typically used to refer to the position number of a list or array?

A) array
B) index
C) list
D) data structure
E) None of these
Question
Given a list, animalList, that contains the objects: cat, dog, tiger, lion; the function last item from list would return which object?

A) cat
B) dog
C) tiger
D) lion
E) None of these
Question
What is the index of the last position in an array that contains 10 items?

A) 0
B) 1
C) 9
D) 10
E) None of these
Question
Which instruction is used to step through each element of an array?

A) Do together
B) For all in order
C) For all together
D) loop
E) None of these
Question
What is the term for a stored group of items that can be added to while the world is running?

A) array
B) index
C) list
D) data structure
E) None of these
Question
What is the function used to randomly choose an element from a list?

A) first item from list
B) ith item from list
C) random item from list
D) random number
E) None of these
Question
A(n) ___________________ holds a group of items and has a fixed size so new items cannot be added while the world is running.
Question
The Do together instruction is used to have each element of a list execute the same instructions simultaneously.
Question
The Collection Editor can be used to add elements to an array.
Question
The first position in an array is position 0.
Question
Items can be added to a list or array using the ___________________ section of the create new variable dialog box.
Question
The first position in a list or array is position ___________________.
Question
You can only remove an item that is currently in an array by replacing it with some other value.
Question
A(n) ___________________ is a mechanism for storing and organizing data, such as a list or an array.
Question
The list processing instruction, ___________________, is used when you want all of the elements of a list to execute the same instruction(s) simultaneously.
Question
The items in an array are commonly called elements.
Question
A(n) ___________________ holds a group of items and can be added to while the world is running.
Question
The array visualization class is designed as an aid for learning how arrays work.
Question
A list is a dynamic data structure.
Question
An array can have additional elements added to it while the world is running.
Question
The last position in a list or array that contains 5 elements is position ___________________.
Question
The For all in order instruction is used to step through each element of an array.
Question
The first position in a list is position 1.
Question
The last position in a list that contains 5 elements is position 5.
Question
The random number function is used to randomly choose an element from an array.
Question
The term ___________________ is typically used to refer to the position number of a list or array.
Question
The items in an array are commonly called ___________________.
Question
The ___________________ instruction is used to step through each element of an array.
Question
The ___________________ class is designed as an aid for learning how arrays work and is unique to Alice.
Question
The ___________________ function is used to randomly choose an element from a list.
Question
The ___________________ instruction is used to step through each element of a list.
Question
The ___________________ function is used to randomly choose an element from an array.
Question
The ___________________ function is used to get the number of items stored in a list.
Question
Given an array, animalArray, that contains the objects: cat, dog, tiger, lion, monkey; item 2 from animalArray would refer to ___________________.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/48
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 8: Lists and Arrays
1
Which of the following items can be stored in a list?

A) numbers
B) strings
C) objects
D) Boolean values
E) All of these
E
2
Which instruction is used to step through each element of a list?

A) Do together
B) For all in order
C) For all together
D) loop
E) None of these
B
3
Given a list, animalList, that contains the objects: cat, dog, tiger, lion; the function ith item from list, given an index of 1, would return which object?

A) cat
B) dog
C) tiger
D) lion
E) None of these
B
4
What is the term for the section of the create new variable dialog box used to add items to a list?

A) Collection Editor
B) Details Panel
C) List Editor
D) Object Editor
E) None of these
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
5
Items may be added to a list and removed from a list while the world is running.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
6
The list automatically expands as items are added to it, and it automatically shrinks as items are removed from it.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
7
What is the index of the first position in an array that contains 10 items?

A) 0
B) 1
C) 9
D) 10
E) None of these
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
8
What is the general term for a mechanism for storing and organizing data?

A) array
B) index
C) list
D) data structure
E) None of these
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
9
What is the function used to randomly choose an element from an array?

A) first item from list
B) ith item from list
C) random item from list
D) random number
E) None of these
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
10
Given a list, animalList, that contains the objects: cat, dog, tiger, lion; the function first item from list would return which object?

A) cat
B) dog
C) tiger
D) lion
E) None of these
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
11
What is the function used to choose an element from a list at the specified index number?

A) first item from list
B) ith item from list
C) last item from list
D) random item from list
E) None of these
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
12
Which instruction is used when you want all of the elements of a list to execute the same instruction(s) simultaneously?

A) Do together
B) For all in order
C) For all together
D) loop
E) None of these
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
13
Given an array, animalArray, that contains the objects: cat, dog, tiger, lion; item 3 from animalArray would refer to which object?

A) cat
B) dog
C) tiger
D) lion
E) None of these
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
14
What is the term for a stored group of items that has a fixed size so new items cannot be added while the world is running?

A) array
B) index
C) list
D) data structure
E) None of these
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
15
What is the term typically used to refer to the position number of a list or array?

A) array
B) index
C) list
D) data structure
E) None of these
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
16
Given a list, animalList, that contains the objects: cat, dog, tiger, lion; the function last item from list would return which object?

A) cat
B) dog
C) tiger
D) lion
E) None of these
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
17
What is the index of the last position in an array that contains 10 items?

A) 0
B) 1
C) 9
D) 10
E) None of these
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
18
Which instruction is used to step through each element of an array?

A) Do together
B) For all in order
C) For all together
D) loop
E) None of these
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
19
What is the term for a stored group of items that can be added to while the world is running?

A) array
B) index
C) list
D) data structure
E) None of these
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
20
What is the function used to randomly choose an element from a list?

A) first item from list
B) ith item from list
C) random item from list
D) random number
E) None of these
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
21
A(n) ___________________ holds a group of items and has a fixed size so new items cannot be added while the world is running.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
22
The Do together instruction is used to have each element of a list execute the same instructions simultaneously.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
23
The Collection Editor can be used to add elements to an array.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
24
The first position in an array is position 0.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
25
Items can be added to a list or array using the ___________________ section of the create new variable dialog box.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
26
The first position in a list or array is position ___________________.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
27
You can only remove an item that is currently in an array by replacing it with some other value.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
28
A(n) ___________________ is a mechanism for storing and organizing data, such as a list or an array.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
29
The list processing instruction, ___________________, is used when you want all of the elements of a list to execute the same instruction(s) simultaneously.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
30
The items in an array are commonly called elements.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
31
A(n) ___________________ holds a group of items and can be added to while the world is running.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
32
The array visualization class is designed as an aid for learning how arrays work.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
33
A list is a dynamic data structure.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
34
An array can have additional elements added to it while the world is running.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
35
The last position in a list or array that contains 5 elements is position ___________________.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
36
The For all in order instruction is used to step through each element of an array.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
37
The first position in a list is position 1.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
38
The last position in a list that contains 5 elements is position 5.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
39
The random number function is used to randomly choose an element from an array.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
40
The term ___________________ is typically used to refer to the position number of a list or array.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
41
The items in an array are commonly called ___________________.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
42
The ___________________ instruction is used to step through each element of an array.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
43
The ___________________ class is designed as an aid for learning how arrays work and is unique to Alice.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
44
The ___________________ function is used to randomly choose an element from a list.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
45
The ___________________ instruction is used to step through each element of a list.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
46
The ___________________ function is used to randomly choose an element from an array.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
47
The ___________________ function is used to get the number of items stored in a list.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
48
Given an array, animalArray, that contains the objects: cat, dog, tiger, lion, monkey; item 2 from animalArray would refer to ___________________.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 48 flashcards in this deck.