We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 5
PES
UNIVERSITY
Department of Computer Science and
EngineeringPESUniversity,Bangalore,India
PythonforComputationalProblemSolving(UE24CS151A) Problem
Statement: Level-
Prepared by: Prof. Teja I and Prof Priyanka S Date: 4"*November, 2024
Dept. of CSE, PESU Timing:
:45PMto4:00PM
Problem: Movie Database Analysis
Given the details of movies in a file containing three words in each column-Genre, Director,
and Movie title, find the solution for the following questions
1. Find the total number of movies.
2, Find the number of unique genres.
3, Display the list of movies in each genre,
4. Find the number of directors in each genre.
5, Find the list of directors who have directed movies in each genre.
6. Find the number of movies directed by each director.
7, Find the list of movies directed by each director.
8, Find the number of movies directed by each director in each genre,
Optional:
9, Find the list of movies directed by each director in each genre.
10. Add two new movies to the existing data with all required details.
11. Sort the names of movies in the ascending order.
Dataset: Movie Database Analysis(movies.txt)
Action, Christopher Nolan, Inception
Action, Christopher Nolan, The Dark Knight
Drama, Steven Spielberg, Schindler's List
Drama, Quentin Tarantino, Pulp Fiction
Comedy, Edgar Wright, Hot Fuzz
Action, James Cameron, Terminator 2
Comedy, Wes Anderson, The Grand Budapest Hotel
Drama, Christopher Nolan, Dunkirk
Action, Quentin Tarantino, Kill Bill: Volume 1
Action, James Cameron, Avatar
Methodology:
Load the Dataset-Load the dataset from a file into to a variable for easier
manipulation. Data Exploration- Explore the dataset.
Detailed Analysis-Make sure you know the significance of each column and arrow ina
given datasetLanguage:Python3.10orabove.
+ Used ata structures such as lists , sets and dict store and organize the data.
+ Use/writeappropriatefunctions-SpecifictoDatastructuresandalsouser
defined functions for each functionality.
+ Make use of operators ,loops and conditionals
Menu for movie database analysis
De ea
Perec eae es eace
eee icons
Paects
aor
Subproblem1:
Sat ee ce ee eta
Seren ra ane oe)
Subproblem2:
Enter your choice: 1 to 11 and 12 to exit2
eae ECC
Subproblem3:
Serra ee ever s)
POSt Let ote ere aaa) ae ee CR SAR CUT
Pee ota eee estos comer
oe ate meena caeSubproblem4:
Coe Pe Feat
Subproblems:
Som Tet rnc metres)
Action: Christopher Nolan, Quentin Tarantino, James Cameron
Pe CS URES Sue eS else eS eer ea EU
one eee eee ee
Subproblem6:
Enter your choice: 1 to 11 and 12 to exit6
foie soe eee
Sees Foe Ea eee
Quentin Tarantino: 2 movies
ree St eaee ace
Reeemeru Ss LEP ae Cr!
Wes Anderson: 1 movies
Subproblem7:
Enter your choice: 1 to 11 and 12 to exit7
Christopher Nolan: Inception, The Dark Knight, Dunkirk
SS lesa Ree a era
Quentin Tarantino: Pulp Fiction, Kill Bill: Volume 1
eee tc tea sated
Ree Ss Cras ae eer eles
(eeu es DER Cs- UM Ce ae
Subproblem8:
Go en Eee ees
Christopher Nolan - Action: 2 movies
epee eae Ce ee Ue er
SCS lls wee eee eee
Cres CMe tt eer UC eee
Cre err tre cst em er
eh Sct eee ER Ed
Reema Meer asthe Meee
Vee Ceo eet eetSubproblem9:
Enter your choice: 1 to 11 and 12 to exit9
eet yo oa eRe Cas Ce SC Racca
cree ose mee cue tea
Steven Spielberg - Drama: Schindler's List
Quentin Tarantino - Drama: Pulp Fiction
Quentin Tarantino - Action: Kill Bill
ea Sc ec EM peated
Reese stl Ri Tu ae ret
Wes Anderson - Comedy: The Grand Budapest Hotel
Subproblem10:
Cr ee UC ee Sst
d
Action, Christopher Nolan, Inception
Action, Christopher Nolan, The Dark Knight
Drama, Steven Spielberg, Schindler's List
Drama, Quentin Tarantino, Pulp Fiction
Comedy, Edgar Wright, Hot Fuzz
Action, James Cameron, Terminator 2
Comedy, Wes Anderson, The Grand Budapest Hotel
Drama, Christopher Nolan, Dunkirk
Action, Quentin Tarantino, Kill Bill: Volume 1
Action, James Cameron, Avatar|
Sci-Fi, Ridley Scott, Blade Runner
Action, Martin Scorsese, The Departed
Subproblem11:
Enter your choice: 1 to 11 and 12 to exitl1
OCs st mtorr a0
Action, James Cameron, Avatar
amram ec aC Cer
Drama, Christopher Nolan, Dunkirk
Ce ev Stated
Action, Christopher Nolan, Inception
Action, Quentin Tarantino, Kill Bill: Volume 1
Drama, Quentin Tarantino, Pulp Fiction
eS ON eS eee er
estan Cee es Coaror ad
Action, Christopher Nolan, TI aula
SSC ie ss Gees Ce es)
ene Ae Oe Gee oe aCearr Ceca eT
ctr
SubmissionMode:
Link is shared by Faculty member in that session. Choose the correct section you belong
to in the current semester.
-END-