Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python Thank you :) 1. A list can be used as a value in a dictionary. a. True b. False 2. What happens when the

image text in transcribedimage text in transcribed

Python

Thank you :)

1. A list can be used as a value in a dictionary. a. True b. False 2. What happens when the get function is used and the key is not in the dictionary? a. The get function will return the key name b. The get function will return the value associated with the key c. The get function will create a new key with that name and default value d. None of the above 3. What does the following code output? eng2sp = \{'one':'uno', 'two':'dos', 'three':'tres' } print(list(eng2sp.keys()) + list(eng2sp.values())) a. ['one', 'two', 'three'] b. ['uno', 'dos', 'tres'] c. ['one', 'uno', 'two', 'dos', 'three', 'tres'] d. ['one', 'two', 'three', 'uno', 'dos', 'tres'] e. ['uno', 'dos', 'tres', 'one', 'two', 'three'] f. None of the above 4. What is the output of the following code? mydict ={ "key1": "value1", "key2": "value2" } myList = [] for b in mydict: myList.append(b) print(myList) a. ["value1", "value2"] b. ["key1", "key2"] c. [("key1", "value1"), ("key2", "value2")] d. None of the above 5. What is the method used to separate a string variable called peaches by spaces? a. peaches.split(" ".) b. peaches.translate() c. peaches.split(" ") d. A and B e. None of the above

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Peter Robb,Carlos Coronel

5th Edition

061906269X, 9780619062699

More Books

Students also viewed these Databases questions

Question

Determine miller indices of plane A Z a/2 X a/2 a/2 Y

Answered: 1 week ago