Question: # Question 1 : Create a list using the following artists names: # Weird Al ' , 'Bruno Mars', 'Ricky Martin', ' HP Boyz', 'James
# Question : Create a list using the following artists names:
# "Weird Al 'Bruno Mars', 'Ricky Martin', HP Boyz', 'James Blunt', NeYo 'Paul McCartney', 'Little River Band'
Sort it from ZA
Output the resulting list
# Question : Add 'Juice Wrld in the rd position of the list
# Remember: Don't remove any of the the current list items
Output the resulting list
# Question : Make a dictionary that has the artist name as the key and the number of plays at the value.
Loop through the artist list from question to populate the dictionary.
Hint: Using the plays information below, create a list of plays where the order of plays
# matches the order of the artists in the artist list.
For example, in the play list, would be the first variable listed because
# 'Weird Al is the first variable listed in the artist list. would be the second variable
# listed in the play list because 'Ricky Martin' is the second variable listed in the artist list.
#Output the resulting dictionary.
# Weird AL plays
Ricky Martin plays
Juice Wrld plays
# Paul McCartney plays
NeYo plays
# Little River Band plays
James Blunt plays
# HP Boyz plays
Bruno Mars plays
# Question : Due to technical errors this month all artists lost count of plays.
Loop through the artist dictionary from question and add to the count of plays for all artists.
Output the resulting total number of plays for each artist output just the dictionary values
# Question : Delete all artists that do not meet our CloutMinimum where their plays are less than the CloutMinimum of
# Hint: Use a loop to find the unpopular artists artists with a play count less than the CloutMinimum
Use another loop to delete those artists from the artist dictionary.
# Ouput the resulting dictionary.
Clout Minimum
unpopular
# Question :
# Isaac and Grays are two listener profiles.
# Below is a dictionary for Isaac and a dictionary for Grays.
'favArtist' is the key and a list of preferred artists are the values.
# Also below is the allArtists list. This is a list of all available artists.
# Isaac likes 'Little River Band', 'Jackson HP Boyz', and NeYo
# Grays likes all the other artists listed in the allArtists list he doesn't like the artists in Isaac's list
# Use a loop to update Graysons favArtists update the values to the key 'favArtists"
# HINT: You may want to use 'not in to find Grays's preferred artists.
# Output Grays and Isacc's list of perferred bands.
Isaac 'favArtists": Little River Band', 'Juice WrldHP Boyz', NeYo
Isaac favArtists": Grays fartists":
Q Question : For both Issac and Grays, calculate the total artist plays the sum of the plays of all their favorite artists
# Make a new 'allplays' key in the Isaac dictionary and the Grays dictionary.
# Insert the totat plays of all their favorite artists as the value of the 'ailplays' key.
# NOTE: Before you run this block of code, run question again to repopulate the artist dictionary.
# Just push the 'play" button next to question to run it again.
# Output the resulting dictionaries.
# Who has the most plays likes more mainstream music and who has the less plays likes more indie music
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
