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 python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  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.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

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