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

  The program should allow the student

The program should allow the student to enter the answer. If the answer is correct, a message of congratulations should be displayed. If the answer is incorrect, a message showing the correct answer should be displayed.

  Write a program that generates two integers

Write a program that generates two integers under 100, show them on screen, and prompts the user to enter the sum of these two integers. The program then reports true if the answer is correct, false otherwise.

  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 a vertical scroll bar is associated with a list box

What are instance variables, and what role does the name ‘self' play in the context of a class definition. Describe how a vertical scroll bar is associated with a list box.

  Disabled individuals open jars and containers

What variables are you going to need and what will be their datatype and how would you break this problem into numerous smaller units?

  Write python program isosceles tri equilateral tri rectangle

Write python program Isosceles Tri Equilateral Tri Rectangle, Write another "driver" script called project1.py which imports the polygon.py module, reads an input file of polygonal data and writes another file of areas and perimeters.

  Development on windows and linux systems

develop a simple, data-intensive application in Python - Data Analysis of a Document Tracker

  Asign true to the variable has_dups

Asign True to the variable has_dups if the string s1 has any duplicate character (that is if any character appears more than once) and False otherwise

  Design reusable parameterised functions

create multiple icon styles that can be drawn at different sizes, it would be very repetitive if you tried to code the whole solution using ‘brute force.' Instead you are strongly encouraged to design reusable parameterised functions to draw the i..

  Improve the code for the haunted house game

Improve the readability of the code by improving the function names, variables, and loops, as well as whitespace. Document these changes in your journal and define a win condition for the game, for example, collecting all items and returning to the..

  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.

  Recursive sorts are easier to write in functional style

Recursive sorts are easier to write in functional style than others. Two recursive sorts are  Quicksort and Mergesort. Write functional versions of (a) Quicksort; (b) Mergesort in an  imperative language of your choice (e.g., C, Ada, C++, Python), us..

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