Question: Function using python, please help! Function name: buy album:s Parameters: a dictionary named album_buy_dict (key is the name of an album (string): value is a

Function using python, please help!

Function using python, please help! Function name: buy album:s Parameters: a dictionarynamed album_buy_dict (key is the name of an album (string): value is

Function name: buy album:s Parameters: a dictionary named album_buy_dict (key is the name of an album (string): value is a the album's artist (string)), a dictionary named artist_price_dict (key is name of an artist (string): value is the price per album of all that artist's albums (float)) Returns: a dictionary (key is the name of an artist (string): value is how much was paid in total for all of the albums we bought that were theirs (float)) Description: Write a function that takes in a dictionary in which every key is the name of an album, and every is a string of the name of the album's artist, as well as a dictionary in which every key is an artist's name, and every value is a float of the price per album for that artist for all their albums. The function should return a dictionary in which every key is the name of an artist whose album(s) you bought, and the value is the total amount you paid for the album(s) of that particular artist (i.e. price per that artist's albums total number of albums bought). The dictionary should also have a key-value pair where the key is "total" and the value is the grand total for all of the albums you bought

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!