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

  Write a program that reads the name of a data file

Write a program that reads the name of a data file which contains student ids (such as c1234500) and their scores. The program will find and print the average score, the number of students processed.

  Write a program that produces a comparison of the balance

Write a program that produces a comparison of the balance of a bank account over time between simple, monthly and daily methods of compounding interest.

  You are tasked with improving the code for the haunted

you are tasked with improving the code for the haunted house game. please read the associated hand-out and the code

  Write a program that uses a bar

Write a program that uses a bar chart to display the percent-ages of the overall grade represented by the project, quizzes the midterm exam and the final exam

  Compare programming with python and programming with scratch

Compare programming with python and programming with scratch. Describe the same program you might create in both programming languages.

  Question 1 research 5-8 species within one family of birds

question 1 research 5-8 species within one family of birds. be sure to use primary or very good secondary literature

  1 why is biodiversity importantnbsp discuss the ways in

1 why is biodiversity important?nbsp discuss the ways in which the value may be assigned to biodiversity. based on your

  The dictionary order based on the ascii order

Needless to say, the dictionary order based on the ASCII order is not what a real-world indexing software wants. So, we want to implement the dictionary order of strings in the standard wa

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  Write a function comp(d1,u1,d2,u2)

Write a function comp(d1,u1,d2,u2)

  Find the output of the given script in python

Find the output of the following script in Python. Note: All statements are valid. Rewrite the following for loop Python statements using while loop.

  Write a program that opens an encrypted file

Write a second program that opens an encrypted file and display its decrypted contents on the screen.

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