What good are movie ids and ratings

Assignment Help Python Programming
Reference no: EM131145201

PYTHON:

1.Implement a function called topRated(). The function will take a file name as a parameter and return a sorted list. The file it reads in contains 500 numeric movie IDs and their rating by user. The function should return a list of movie IDs and their average rating based on the file data. The list that is returned should also be sorted by average rating. I have included code in the extra credit template to do that for you.

HINT: The best way to tackle this problem is to break it up into two parts. You must first read the file in and create a dictionary of all the movie IDs as keys. The value to those keys should be a list. Worry about solving the average after the dictionary is created

2. What good are movie IDs and ratings? You want to know the actual title of the movie! Implement a function called getTitles(). The function takes two parameters.

The first is the list we created in the previous problem. The second is a text file containing movie IDs and titles. The function should loop through the list of IDs that is passed to it and through the text file.

When an ID in the list matches that of an ID in the text file you know the title in the text file is associated with that ID. Return a sorted list by average rating.

Reference no: EM131145201

Questions Cloud

Explain why the hotel may not have been successful : When the Westin Stamford hotel in Singapore advertised that it was the world's tallest hotel, it attempted to create a point-of-difference (POD). Explain why the hotel may not have been successful in its attempt to create its POD.
Based on the following data would you recommend buying : Based on the following data, would you recommend buying or renting? Assume an after-tax saving interest rate of 6 percent and a tax rate of 28 percent.
Is the wifi system efficient : Suppose the town keeps track of the contributions and issues passwords to people who contributed at least $20. Would you expect the total contributions to cover the $20,000 cost? 30.
Define balanced scorecard : Define balanced scorecard. What are the four perspectives it considers? Provide examples of metrics used to measure them.
What good are movie ids and ratings : Implement a function called topRated(). The function will take a file name as a parameter and return a sorted list - What good are movie IDs and ratings? You want to know the actual title of the movie! Implement a function called getTitles(). The fu..
Discusses the role of the judicial system in united states : Write an essay of 250-500-words that discusses the role of the judicial system in the United States today. Discuss the historical context of the judicial system.
What are the capacity requirements for the next four years : AlwaysRain Irrigation, Inc., would like to determine capacity requirements for the next four years.- What are the capacity requirements for the next four years?
Why you feel it is important to take each step : Unit 8 Seminar: Your response should be a minimum of 400 words. Discuss the various steps you will take after the interview to follow up. Explain each step you will take and why you feel it is important to take each step.
What trade-offs are associated with accepting gotcha s offer : What trade-offs are associated with accepting Gotcha s offer?

Reviews

Write a Review

Python Programming Questions & Answers

  Specializes in solving the equations ax=b by doolittle''s dec

Write a  program that specializes in solving the equations Ax=b by Doolittle's decomposition method, where a is the HIbber matrix of arbitrary size nxn

  Project title email spam filterabstractanalyze the emails

project title email spam filterabstractanalyze the emails and predict whether the mail is a spam or not a spam.to work

  The interest rate per period

The interest rate per period. For example, if your loan's interest is 6.5% per year, and you are paying monthly, this would be 6.5%/12. If you are paying every two weeks, r would be 6.5%/26, because there are 26 two-week periods in a year.

  How do you call the main function in python

How do you call the main function? in Python

  Create an inheritance relationship between two classes

For this assignment you will create a simple class hierarchy. You will create an inheritance relationship between two classes -- a Friend class and a Person class - Friend will inherit Person

  Python errors

python errors, please correct them that are located in this program,

  Code for the haunted house game

Improve the game by adding more features, for example you can examine more items, more props etc. You may implement this using more lists regarding items and props, remember, you should check if the object is being carried or in the location of th..

  Permutation ciphers

Permutation Ciphers (a.k.a. Transposition Ciphers) are another class of simple cryptosystems. For this we use the functions apply(.,.) and inv(.) from Homework 4; copy these two functions into your le as auxiliary functions.

  Aussie best car abcdeclares that based on its yearly sales

aussie best car abcdeclares that based on its yearly sales it will award a bonus as follows. the bonus will be equally

  Define three types of programming errors

Define three types of programming errors and explain with examples

  Find in the dataset how often u2 is mentioned as artist

Write and run Hadoop code (mappers and reducers) to find in the Last.fm dataset (a) how often U2 is mentioned as artist and (b) songs that have been played more than 600 million times.

  The integers should be printed in order with addresses

The integers should be printed in order with addresses from main. When the steps of the function order have been completed the smallest value will be stored in a, the middle in b, and the largest in c.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd