Ask Question
14 February, 16:10

Assume there is a variable, album_artists, that is associated with a dictionary that maps albums to performing artists. Write a statement that inserts the key/value pair: "Live It Out"/"Metric"

+5
Answers (1)
  1. 14 February, 18:46
    0
    Following are the program in the Python Programming Language.

    #define function.

    def album ():

    #set dictionary data type variable

    album_artists = dict ()

    #Initialize the key and value in the dictionary

    album_artists["Live It Out"] = "Metric"

    #dispaly the dictionary.

    print (album_artists)

    #call the function

    album ()

    Output:

    {'Live It Out': 'Metric'}

    Explanation:

    Here, we define function "album () " and inside the function.

    Set dictionary data type variable "album_artists" through built-in function "dict () ". Initialize the key and the value inside the dictionary type variable "album_artists". Then, print the following dictionary through the print () function.

    Finally, call the following function "album () ".
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Assume there is a variable, album_artists, that is associated with a dictionary that maps albums to performing artists. Write a statement ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers