Question: [8 pts] Genre dictionary Write a function create_genre_dict that takes as a parameter the movie-to-genre dictionary (created in Task 1.2). The function should return another

[8 pts] Genre dictionary Write a function create_genre_dict that takes as a parameter the movie-to-genre dictionary (created in Task 1.2). The function should return another dictionary in which a genre is mapped to all the movies in that genre. For example: { genre1: [ m1, m2, m3], genre2: [m6, m7] }

[8 pts] Average Rating Write a function calculate_average_rating that takes as a parameter a ratings dictionary (created in Task 1.1). It should return a dictionary where the movie is mapped to its average rating computed from the ratings list. For example: {"Spider-Man (2002)": [3,2,4,5]} ==> {"Spider-Man (2002)": 3.5}

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!