Exam 2: An Overview of Collections
Exam 1: Basic Python Programming51 Questions
Exam 2: An Overview of Collections50 Questions
Exam 3: Searching, Sorting, and Complexity Analysis50 Questions
Exam 4: Arrays and Linked Structures50 Questions
Exam 5: Interfaces, Implementations, and Polymorphism50 Questions
Exam 6: Inheritance and Abstract Classes50 Questions
Exam 7: Stacks50 Questions
Exam 8: Queues50 Questions
Exam 9: Lists50 Questions
Exam 10: Trees50 Questions
Exam 11: Sets and Dictionaries50 Questions
Exam 12: Graphs50 Questions
Select questions type
A search operation is usually more efficient on a sorted collection than on an unsorted collection.
(True/False)
4.8/5
(46)
What is the value of newList after the following code executes?
NewList = list(range(9, 0, -3))
(Multiple Choice)
4.8/5
(36)
A line of customers waiting to get into a movie is an example of a hierarchical collection.
(True/False)
4.9/5
(35)
In which type of collection does each item have many predecessors and successors, called neighbors?
(Multiple Choice)
4.7/5
(34)
In computer science, collections are also called objective data types (ODTs).
(True/False)
4.7/5
(39)
What is the value of newObject after the following code executes?
NewObject = tuple("Hello")
(Multiple Choice)
4.8/5
(36)
What is the value of r after the following code executes?
MyList = [ 2, 3, 5, 7, 11 ]
YourList = list(myList)
R = yourList is myList
(Multiple Choice)
4.8/5
(46)
By default, items in a sorted collection are visited in descending order when using a for loop iterator.
(True/False)
4.8/5
(30)
Which of the following lists Python units of abstraction from smallest to largest?
(Multiple Choice)
4.8/5
(47)
In computer science, abstraction is used for ignoring or hiding details that are nonessential.
(True/False)
4.8/5
(39)
What is the value of r after the following code executes?
MySet = {2, 3, 5, 7, 11}
YourSet = {5, 7, 2, 11, 3}
R = yourSet == mySet
(Multiple Choice)
4.9/5
(34)
To be considered equal, two lists must have the same length and the same items in each position, whereas the same sets must simply contain exactly the same items, but in no particular order.
(True/False)
4.8/5
(37)
When a shallow copy of a collection is made, only references to the items in the new collection are copied.
(True/False)
4.8/5
(49)
Graph collections are organized in a parent/children relationship.
(True/False)
4.7/5
(36)
What can a programmer do to prevent side effects from cloning mutable objects?
(Multiple Choice)
4.9/5
(35)
Showing 21 - 40 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)