Answered step by step
Verified Expert Solution
Question
1 Approved Answer
[10 pts] Write a function read_ratings_data(f) that takes in a ratings file, and returns a dictionary. The dictionary should have movie as key, and the
- [10 pts] Write a function read_ratings_data(f) that takes in a ratings file, and returns a dictionary. The dictionary should have movie as key, and the corresponding list of ratings as value.
For example: movie_ratings_dict = { "The Lion King (2019)" : [6.0, 7.5, 5.1], "Titanic (1997)": [7] }
- [10 pts] Write a function read_movie_genre(f) that takes in a movies file and returns a dictionary. The dictionary should have one to one mapping between movie and genre.
For example { "Toy Story (1995)" : "Adventure", "Golden Eye (1995)" : "Action" }
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