Duke CPS 006 - Test 2 Booster/Final Practice

Unformatted text preview:

Test 2 Booster/Final Practice: Compsci 06Owen Astrachan Robert DuvallDecember 8, 2010Name:NetID/Login:Honor code acknowledgment (signature)value gradeProblem 1 15 pts.TOTAL: 15 pts.1PROBLEM 1 : (IMDB)The Internet Movie Data Base (IMDB) company has asked you to help them determine the actor who hasappeared in the most movies. IMDB data is stored by movie in a CSV format with the movie title first andactors following the title:Taxi Driver,Robert De Niro, Jodie Foster, Cybill Shepherd, Harvey KeitelContact,Jodie Foster, Tom Skerritt, Matthew McConaughey,Max MartiniSommersby,Richard Gere,Jodie Foster,Bill Pullman,James Earl JonesWrite a python function named topActors that takes the name of the data file as a parameter and printsthe top five actors in terms of movie-appearances and their movies in the format shown below. The order ofthe movies printed does not matter. Assume there will be data for more than five different actors in the fileand do not worry about breaking ties in terms of number-of-movies for an actor.Jodie Foster: 10 moviesTaxi DriverPanic RoomLittle Man TateAnna and the KingContactSommersbySilence of the LambsInside ManThe AccusedThe Hotel New HampshireRichard Gere: 5 moviesPretty WomanPrimal FearSommersbyNights in RodantheBrooklyn’s FinestJames Earl Jones: 3 moviesSommersbyStar Wars: A New HopeDr.


View Full Document

Duke CPS 006 - Test 2 Booster/Final Practice

Download Test 2 Booster/Final Practice
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Test 2 Booster/Final Practice and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Test 2 Booster/Final Practice 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?