Question: 1. Create a dictionary. a) Implement a dictionary car with the keys brand, model, and color. Give appropriate values for each key. b) Print the

 1. Create a dictionary. a) Implement a dictionary car with the
keys brand, model, and color. Give appropriate values for each key. b)

1. Create a dictionary. a) Implement a dictionary car with the keys brand, model, and color. Give appropriate values for each key. b) Print the value for each element in the list. c) Add a key transmission to the dictionary with the value automatic'. d) Print the value for the key transmission. Output Example Tesla Model 5 black automatic 2. Create a dictionary. a) Implement a dictionary car with the keys brand, model, and color. Give appropriate values for each key. b) Use a loop and the items() method to print all keys and values. c) Use a loop and the keys () method to print all keys and values. d) Use a loop and the values() method to print all values. Output Example brand Tesla model Model 5 color black brand Tesla model Model 5 color black Tesla Model 5 black 3. Nest dictionaries within a list. a) Implement five car dictionaries with the keys brand and model. Add appropriate values for each key. b) Create a list cars and add all dictionaries to this list. c) Use a loop to print all model values from the list of cars. Output Example Model 5 Model 3 X5 x3 x2 4. Nest dictionaries within a dictionary. a) Implement two doctor dictionaries with the keys name and patient. The key name contains the name of the doctor. The key patient is a dictionary with two keys, firstName and lastName. Add appropriate values for all keys. b) Create a list doctors and append both dictionaries to this list. c) Use a loop to output each doctor and their patient's names. Output Example John: Jane : | IU Yeon Charles Times

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 Databases Questions!