CS1400 Unit 5 Reviewing the Basics Quiz
strings and tuples
Which of the following are immutable data structures?
[10, 15, 20, 30]
The variable data refers to the list [10, 20, 30]. After the statement data.insert(1, 15), the original data evaluates to
10, 5, 30]
The variable data refers to the list [10, 20, 30]. After the statement data[1] = 5, data evaluates to
[10, 20, 30, 40, 50]
The variable data refers to the list [10, 20, 30]. The expression data + [40, 50] evaluates to
1
The variable data refers to the list [10, 20, 30]. The expression data.index(20) evaluates to
[20, 30]
The variable data refers to the list [10, 20, 30]. The expression data[1:3] evaluates to
20
The variable data refers to the list [10, 20, 30]. The expression data[1] evaluates to
None
The variable info refers to the dictionary {"name":"Sandy", "age":17}.The expression info.get("hobbies", None) evaluates to
["name", "age"]
The variable info refers to the dictionary {"name":"Sandy", "age":17}.The expression list(info.keys()) evaluates to
pop
The variable info refers to the dictionary {"name":"Sandy", "age":17}.The method to remove an entry from a dictionary is named