Question 1
Let L be a non-empty list of integers, and D be a non-empty dictionary which are given below:
L = [-2, -1, 0, 1, 2]
D = {-2: 'a', 2: 'b', -1: 'c', 1: 'd', 0: 'e'}
Match the following expressions on the left side with the appropriate values on the right side.
a. D['d']
b. keys(D)
c. isKey(D, 'b')
d. last(init(L)) - last(rest(L))
e. first(init(L)) - first(rest(L))
f. first(rest(rest(L)))
- False
- Invalid key
- L
- 0
- -1
- A list
•
a - (4), b - (6), c - (2), d - (5), e - (5), f - (4)•
a - (4), b - (6), c - (1), d - (5), e - (5), f - (4)•
a - (6), b - (3), c - (1), d - (4), e - (4), f - (4)•
a - (6), b - (3), c - (2), d - (4), e - (4), f - (5)•
None of these