Answer:
- def getData(a_dict, key_list):
- result = []
-
- for key in key_list:
- result.append(a_dict[key])
-
- return result
-
- result = getData( {"puffin": 5, "corgi": 2, "three": 3} , ["three", "corgi"])
- print(result)
Explanation:
Let's define a function <em>getData() </em>with two parameters,<em> a_dict </em>and <em>key_list</em> as required by the question (Line 1).
Since the function is to return a list of associated values of dictionaries, a new list,<em> result</em>, is declared and initialized with empty values (Line 2).
Next, use for-loop to traverse through every string in the input <em>key_list </em>(Line 4) and use the traversed key to address the value in the<em> a_dict </em>and add it to the <em>result</em> list (Line 5)
At last, return the <em>result </em>list as output (Line 7)
We can test the function using the test case from the question and we shall see the output as follows:
[3, 2]
D) both a and b
Microwaves are used to heat foods in ovens. We all know that. They are also used for data and information transfer. Microwaves are used in wifi, gps, and radio astronomy.
Answer:
ReFS format and Storage Spaces.
Explanation:
ReFS(Resilient File System)format was introduced in 2012 and it was the replacement for NTFS(NT File System).It was introduced as a part of the Windows Server.ReFS supports maximum value of 1 yottabyte (1 one million Terabytes). It also supports auto-correct form disk errors and data corruption.You need a storage space to store the data hence we need storage space also.
An address book has a list of addresses
Answer:
Polymorphism- Able to be in several places at once with various forms.