.Question 1Consider the tuple A=((11,12),[21,22]), that contains a tuple and list. What is the result of the following operation A[1] ?1 point(11,12)((11,12),[21,22])[21,22]2.Question 2Consider the tuple A=((11,12),[21,22]), that contains a tuple and list. What is the result of the following operation A[0][1]?1 point2111123.Question 3True or false: after applying the following method, L.append(['a','b']), the following list will only be one element longer.1 pointTrueFalse4.Question 4Consider the following list : A=["hard rock",10,1.2]What will list A contain affter the following command is run: del(A[1]) ?1 point[10,1.2]["hard rock",1.2]["hard rock",10]5.Question 5What is the syntax to clone the list A and assign the result to list B ?1 pointB=AB=A[:]6.Question 6What is the result of the following: len(("disco",10,1.2, "hard rock",10)) ?1 point5607.Question 7Consider the following dictionary:{ "The Bodyguard":"1992", "Saturday Night Fever":"1977"}select the values1 point"1977""1992""The Bodyguard" "Saturday Night Fever"8.Question 8The variable release_year_dict is a Python Dictionary, what is the result of applying the following method: release_year_dict.values() ?1 pointretrieve the keys of the dictionaryretrieves, the values of the dictionary9.Question 9Consider the Set: V={'1','2'}, what is the result of V.add('3')?1 point{'1','2','3'}{'1','2'}{1,2,3}10.Question 10What is the result of the following: '1' in {'1','2'} ?1 pointTrueFalse
Question
.Question 1Consider the tuple A=((11,12),[21,22]), that contains a tuple and list. What is the result of the following operation A[1] ?1 point(11,12)((11,12),[21,22])[21,22]2.Question 2Consider the tuple A=((11,12),[21,22]), that contains a tuple and list. What is the result of the following operation A[0][1]?1 point2111123.Question 3True or false: after applying the following method, L.append(['a','b']), the following list will only be one element longer.1 pointTrueFalse4.Question 4Consider the following list : A=["hard rock",10,1.2]What will list A contain affter the following command is run: del(A[1]) ?1 point[10,1.2]["hard rock",1.2]["hard rock",10]5.Question 5What is the syntax to clone the list A and assign the result to list B ?1 pointB=AB=A[:]6.Question 6What is the result of the following: len(("disco",10,1.2, "hard rock",10)) ?1 point5607.Question 7Consider the following dictionary:{ "The Bodyguard":"1992", "Saturday Night Fever":"1977"}select the values1 point"1977""1992""The Bodyguard" "Saturday Night Fever"8.Question 8The variable release_year_dict is a Python Dictionary, what is the result of applying the following method: release_year_dict.values() ?1 pointretrieve the keys of the dictionaryretrieves, the values of the dictionary9.Question 9Consider the Set: V={'1','2'}, what is the result of V.add('3')?1 point{'1','2','3'}{'1','2'}{1,2,3}10.Question 10What is the result of the following: '1' in {'1','2'} ?1 pointTrueFalse
Solution
-
The result of the operation A[1] on the tuple A=((11,12),[21,22]) is [21,22].
-
The result of the operation A[0][1] on the tuple A=((11,12),[21,22]) is 12.
-
True. After applying the method L.append(['a','b']), the list will be one element longer.
-
After running the command del(A[1]) on the list A=["hard rock",10,1.2], the list A will contain ["hard rock",1.2].
-
The syntax to clone the list A and assign the result to list B is B=A[:].
-
The result of len(("disco",10,1.2, "hard rock",10)) is 5.
-
The values of the dictionary { "The Bodyguard":"1992", "Saturday Night Fever":"1977"} are "1992" and "1977".
-
Applying the method release_year_dict.values() on a Python Dictionary retrieves the values of the dictionary.
-
The result of V.add('3') on the Set V={'1','2'} is {'1','2','3'}.
-
The result of '1' in {'1','2'} is True.
Similar Questions
Consider the tuple A=((1),[2,3],[4]), that contains a tuple and list. What is the result of the following operation A[2][0]?
Consider the following tuple A=(1,2,3,4,5). What is the result of the following: A[1:4]:1 point(2, 3, 4)(3, 4,5)(2, 3, 4,5)
3.Question 3Consider the following tuple A=(1,2,3,4,5), what is the result of the following: len(A)1 point4654.Question 4Consider the following list B=[1,2,[3,'a'],[4,'b']], what is the result of the following:B[3][1]1 point[4,"b"]"c""b"
1.Question 1Consider the following tuple:say_what=('say',' what', 'you', 'will') what is the result of the following say_what[-1]1 point'you''will'' what''say'2.Question 2Consider the following tuple A=(1,2,3,4,5). What is the result of the following: A[1:4]:1 point(2, 3, 4)(3, 4,5)(2, 3, 4,5)3.Question 3Consider the following tuple A=(1,2,3,4,5), what is the result of the following: len(A)1 point4654.Question 4Consider the following list B=[1,2,[3,'a'],[4,'b']], what is the result of the following:B[3][1]1 point[4,"b"]"c""b"5.Question 5What is the result of the following operation?[1,2,3]+[1,1,1]1 pointTypeError [2,3,4][1, 2, 3, 1, 1, 1]6.Question 6What is the length of the list A = [1] after the following operation: A.append([2,3,4,5])1 point5 267.Question 7What is the result of the following: "HelloMike".split()1 point["HelloMike"]["Hello","Mike"]["H"]
What is the syntax to obtain the first element of the tuple?A=('a','b','c')1 pointA[:]A[1]A[0]
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.