1.Question 1What are the keys of the following dictionary: {"a":1,"b":2}1 point1,2"a","b"2.Question 2Consider the following Python Dictionary:Dict={"A":1,"B":"2","C":[3,3,3],"D":(4,4,4),'E':5,'F':6}What is the result of the following operation: Dict["D"]1 point(4, 4, 4)[3,3,3]1
Question
1.Question 1What are the keys of the following dictionary: {"a":1,"b":2}1 point1,2"a","b"2.Question 2Consider the following Python Dictionary:Dict={"A":1,"B":"2","C":[3,3,3],"D":(4,4,4),'E':5,'F':6}What is the result of the following operation: Dict["D"]1 point(4, 4, 4)[3,3,3]1
Solution
-
The keys of the dictionary {"a":1,"b":2} are "a" and "b".
-
The result of the operation Dict["D"] on the given Python Dictionary is (4, 4, 4).
Similar Questions
Assume that d is a Python dictionary. What does the following Python code produce?result = dict()for key in d: val = d[key] if val not in result: result[val] = [key] else: result[val].append(key)Question 14Select one:a.a histogramb.an inverted dictionaryc.a list of tuplesd.a lookupe.a reverse lookup
The 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 dictionary
Assume that d is a Python dictionary. What does the following Python code produce?d = {'apple': 1, 'banana': 2, 'orange': 3, 'grape': 2}v = 2 for k in d: if d[k] == v: print(k) Question 4Select one:a.apple orangeb.banana grapec.banana oranged.grape orange
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"
Which of the following is correct with respect to the above Python code?d={"a":3,"b":7}a dictionary d is created.a and b are the keys of dictionary d.3 and 7 are the values of dictionary dAll of the above.
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.