Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Define a function named create_books_ratings_dictionary (people_ratings, books_list) which takes a ratings dictionary and a book list as parameters. The function returns a new dictionary. The

image text in transcribed

Define a function named create_books_ratings_dictionary (people_ratings, books_list) which takes a ratings dictionary and a book list as parameters. The function returns a new dictionary. The key of the new dictionary is the book id and the value of the new dictionary is a list of ratings for the particular book. For example, consider the following rating dictionary: people_ratings = {'Adam':[7, 2, 5],'Jo':[9, 2, 3] } Then, the ratings for the first book are [7, 9] and the ratings for the second book are [2, 2] and so on. Hence, the resulting dictionary would e: { 'BC001': [7, 9], 'BC002': [2, 2], 'BC003': [5, 3] }

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_2

Step: 3

blur-text-image_3

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

Database Systems Design Implementation And Management

Authors: Peter Robb,Carlos Coronel

5th Edition

061906269X, 9780619062699

More Books

Students also viewed these Databases questions

Question

Ask chegg ai , who was the first to land on moon?

Answered: 1 week ago