Question: Question 1 7 ( 1 point ) Saved Listen Given that the following code: mystery = [ ] dct = { 7 : truckin', -

Question 17(1 point)
Saved
Listen
Given that the following code:
mystery =[]
dct ={7: "truckin'", -3: "keep", 5: 'on'}
for key in sorted(dct):
mystery.append(dct[key])
mystery =''.join(mystery)
The value of mystery is:
Question 17 options:
"truckin' keep on"
"keep on truckin'"
["truckin'", "keep", "on"]
"truckin'keepon"
Question 18(1 point)
Listen
Given that the following code:
mystery =[]
dct ={7: "truckin'", -3: "keep", 5: 'on'}
for key in sorted(dct):
mystery.append(dct[key])
mystery =''.join(mystery)
The value of mystery is:
Question 18 options:
"truckin' keep on"
"keep on truckin'"
["truckin'", "keep", "on"]
"truckin'keepon"
We don't know because dictionaries are unordered.
Question 19(1 point)
Listen
Given that the following code:
dct ={7: "truckin'", 8: "keep"}
mystery = dct.values()
dct[9]="on"
mystery = list(mystery)
The value of mystery is:
Question 19 options:
["truckin'", "keep"]
["keep", "truckin'"]
["truckin'", "keep", "on"]
["keep","on", "truckin'"]
Question 20(1 point)
Listen
Given that the following code:
dct ={7: "truckin'", 8: "keep"}
mystery = dct.values()
dct[9]="on"
mystery = sorted(mystery)
The value of mystery is:
Question 20 options:
["truckin'", "keep"]
["keep", "truckin'"]
["truckin'", "keep", "on"]
["keep","on", "truckin'"]
We don't know because dictionaries are unordered.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!