Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

How To Build A Million Dollar Database

Authors: Michelle Bergquist

1st Edition

0615246842, 978-0615246840

More Books

Students also viewed these Databases questions

Question

Describe the factors influencing of performance appraisal.

Answered: 1 week ago

Question

What is quality of work life ?

Answered: 1 week ago