Load the pickled movie file standard python object load in the ratings from the text file.Python Programming

Follow the following directions:

  • Load the pickled movie file (it is a standard python object)
  • Load in the ratings from the text file (open up file to determine separator)
    • Must have error handling for the entries where the ratings are malformed, output the user who entered the bad data (see below...must use try:except block)
  • Parse the ratings and update the movie object (ratings and number of ratings)
  • Calculate a new average for every movie
  • Organize the movies into a new list based on the highest rating first, lowest rating last
  • Save the organized list of movies (dictionary objects containing the title, year, and new rating only) as a new pickled file (organized_movies.p)
  • Output the highest and lowest dictionary objects



Movies Loaded
worldlyCow9's rating is non numeric
blissfulTermite9's rating is non numeric
cautiousRhino6's rating is non numeric
Ratings Loaded
Highest rated movie:  {'title': 'The Wild Bunch', 'year': 1969, 'rating': 7.98304347826087}
Lowest rated movie:  {'title': 'Casino', 'year': 1995, 'rating': 6.973243243243243}
New File Saved



Instructions Files

Expert's Answer


Python Programming Experts

Issac Torres
Python Programming

67 Answers

Python Programming

60 Answers

View More Experts

The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.

Get Free Quote!

265 Experts Online