Filters
Question type

Study Flashcards

A collection contains at least one item.

A) True
B) False

Correct Answer

verifed

verified

Which object type is immutable?


A) list
B) set
C) dict
D) tuple

E) B) and D)
F) B) and C)

Correct Answer

verifed

verified

Which operator can you use to test for item membership in a collection?


A) in
B) ==
C) @
D) is

E) A) and B)
F) A) and C)

Correct Answer

verifed

verified

What is the value of aList after the following code is executed? AList = [ 1, 2, 3 ] AList.remove(2)


A) [ 1, 2 ]
B) [ 1, 3 ]
C) [ 3 ]
D) [ 1 ]

E) B) and C)
F) A) and D)

Correct Answer

verifed

verified

Without abstraction, you would need to consider all aspects of a software system simultaneously.

A) True
B) False

Correct Answer

verifed

verified

In what order are dictionary items visited during an iteration?


A) the order in which they were added
B) ascending, by key value
C) descending, by item value
D) no particular order

E) A) and C)
F) None of the above

Correct Answer

verifed

verified

Which Python function returns the total number of items in a collection?


A) sizeof
B) len
C) count
D) total

E) A) and B)
F) C) and D)

Correct Answer

verifed

verified

When collections share mutable items, a deep copy using a for loop should be used to explicitly clone items before adding them to a new collection.

A) True
B) False

Correct Answer

verifed

verified

What is a group of zero or more items that can be operated on as a unit?


A) grouping
B) collection
C) array
D) organization

E) B) and C)
F) None of the above

Correct Answer

verifed

verified

Which type of collection is ordered by position?


A) linear
B) hierarchical
C) graph
D) sorted

E) B) and C)
F) C) and D)

Correct Answer

verifed

verified

Showing 41 - 50 of 50

Related Exams

Show Answer