The function below takes one parameter: a dictionary (dictionary). Complete the function so that it prints out each of the given dictionary's keys, each on a separate line. Recall that dictionaries store key:value pairs and that when you iterate through a dictionary with a for loop, you are interating through the keys.

Respuesta :

Answer:

Complete function is as below:

Explanation:

defprint_dict_keys(dictionary):

for key in dictionary.keys():

print(key)

This is the required complete function.

The function that takes one parameter: a dictionary (dictionary) and prints out each of the given dictionary's keys, each on a separate line is as follows;

def print_key(dictionary):

    return dictionary.keys()

         

print(print_key({"name":"micheal", "age": 30, "location":"Las Vegas"}))

Code explanation:

The code is written in python.

  • We defined a function named "print_key" and the function takes a parameter named "dictionary".
  • We returned the keys of the dictionary. Recall dictionary comes with a key-value pair.
  • Then, we finally called the function with its required parameter.

learn more on python here: https://brainly.com/question/26104476

Ver imagen vintechnology