Tuples — Chapter Test

Answer all 5 questions, then submit. You need 60% to pass. Log in to save progress.

Question 1
What is the main difference between a tuple and a list?
ATuples can only hold numbers
BTuples are immutable; lists are mutable
CTuples are unordered
DThere is no difference
Question 2
How do you correctly write a tuple with a single item, 5?
A(5)
B(5,)
C[5]
D{5}
Question 3
What does x, y = (3, 8) do?
ACauses an error
BUnpacks the tuple, setting x = 3 and y = 8
CMakes x and y both equal (3, 8)
DCreates a list
Question 4
When is a tuple a better choice than a list?
AWhen the data will be added to and removed often
BWhen the data should not change (e.g. coordinates)
CWhen you need to sort the data in place
DTuples are never preferable
Question 5
Which brackets are used to write a tuple?
ASquare [ ]
BRound ( )
CCurly { }
DAngle < >