Answered step by step
Verified Expert Solution
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
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started