Question: A ( n ) _ _ _ _ _ _ _ _ _ _ is an unordered collection of items with no duplicates. Question 1

A(n)__________ is an unordered collection of items with no duplicates.
Question 1 options:
dictionary
file
set
tuple
Question 2(1 point)
Elements of a set are delimited with __________.
Question 2 options:
{}
[]
()
<>
Question 3(1 point)
What is the output printed by the Python statement: print (set('bookkeeper'))
Question 3 options:
{'b','o','o','k','k','e','e','p','e','r'}
{'o','b','e','r','p','k'}
{'o','b','e','k'}
{'bokepr'}
Question 4(1 point)
Assume s1= set('what is this') and s2= set('a jellyfish'). Indicate the value that will be displayed if the following expression is entered at the Python prompt: len(s1|s2)
Question 4 options:
Question 5(1 point)
Assume s1= set('what is this') and s2= set('a jellyfish'). Indicate the value that will be displayed if the following expression is entered at the Python prompt: s1-s2
Question 5 options:
Question 6(1 point)
Assume s1= set('what is this') and s2= set('a jellyfish'). Indicate the value that will be displayed if the following expression is entered at the Python prompt: s1&s2
Question 6 options:
{'h','s','a','l','i',''}
{'h','s','a','i',''}
{'h','s','e','i',''}
{'h','s','a','i'}
Question 7(1 point)
In a dictionary, a pair such such as dog : rover is called a(n)__________.
Question 7 options:
item
pair
key
couple
Question 8(1 point)
Sets cannot contain lists.
Question 8 options:
TrueFalse
Question 9(1 point)
Elements of a set may be duplicated.
Question 9 options:
TrueFalse
Question 10(1 point)
In a dictionary, keys must be immutable objects.
Question 10 options:
TrueFalse
Question 11(1 point)
Assume d1={name: John, age: 25,0: blue, 86: 20,1:20}. Indicate the value that will be displayed if the following expression is entered at the Python prompt: list(d1.values())
Question 11 options:
('john',25, 'blue', 20)
('john',25, 'blue', 20,20)
('john',25,20,20)
None of the above
Question 12(1 point)
Assume d1={name: John, age: 25,0: blue, 86: 20,1:20}. Indicate the value that will be displayed if the following expression is entered at the Python prompt: d1['age']
Question 12 options:
20
'blue'
'John'
25
86
Question 13(1 point)
Assume d1={name: John, age: 25,0: blue, 86: 20,1:20}. Indicate the value that will be displayed if the following expression is entered at the Python prompt: d1[20]
Question 13 options:
1
86
a & b
IndexError
None of the above
Question 14(1 point)
What do you call runtime errors that usually occur due to circumstances beyond the programmer's control?
Question 14 options:
exceptions
syntax errors
user errors
random
Question 15(1 point)
Saved
Assume list1=[1,5,'6','x',20]. Indicate the value that will be displayed if the following expression is entered at the Python prompt: list1[1]+list1[2]
Question 15 options:
IndexError
KeyError
NameError
TypeError
ValueError
None of the above
Question 16(1 point)
Assume list1=[1,5,'6','x',20]. Indicate the value that will be displayed if the following expression is entered at the Python prompt: int(list1[2])
Question 16 options:
IndexError
KeyError
NameError
TypeError
ValueError
None of the above
Question 17(1 point)
Assume list1=[1,5,'6','x',20]. Indicate the value that will be displayed if the following expression is entered at the Python prompt: int(list1[3])
Question 17 options:
IndexError
KeyError
NameError
TypeError
ValueError
None of the above
Question 18(1 point)
Which one of the following is a reserved word?
Question 18 options:
attempt
test
try
All of the above
None of the above

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!