Question 1
Let L be a non-empty list of integers, and D be a non-empty dictionary which are given below:
L = [8, -4, 10, 4, -6]
D = {1: {"Name": "John", "Age": 12, "Gender": 'M'}}
Match the following expressions on the left side with the appropriate values on the right side.
| a. member(L, 10) | 1. 12 |
|---|---|
| b. isKey(D, "Name") | 2. 10 |
| c. D[1]["Age"] | 3. [1] |
| d. first(L) + last(init(L)) | 4. False |
| e. first(rest(rest(L))) | 5. True |
| f. keys(D) | 6. Invalid expression |
a - (5), b - (5), c - (6), d - (3), e - (2), f - (6)
a - (5), b - (4), c - (1), d - (1), e - (2), f - (3)
a - (5), b - (4), c - (6), d - (1), e - (1), f - (6)
a - (5), b - (5), c - (1), d - (1), e - (2), f - (3)
a - (5), b - (6), c - (1), d - (1), e - (2), f - (3)