Module 2 Graded Quiz
14. Consider the tuple A=((1),[2,3],[4]), that contains a tuple and list. What is the result of the following operation A[2] ?
- [4]
- [2,3]
- 1
15. Consider the tuple A=((11,12),[21,22]), that contains a tuple and list. What is the result of the following operation A[0][1]?
- 21
- 11
- 12
16. The method append does the following:
- adds one element to a list
- merges two lists or insert multiple elements to a list
17. Consider the following list : A=["hard rock",10,1.2]
What will list A contain after the following command is run: del(A[0]) ?
- [10,1.2]
- [“hard rock”,10,1.2]
- [“hard rock”,10]
Shuffle Q/A 2
20. Consider the following dictionary:
{ "The Bodyguard":"1992", "Saturday Night Fever":"1977"}
select the values
- “1977”
- “1992”
- “The Bodyguard”
- “Saturday Night Fever”