Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The aim of the Movie Recommendation System is to provide information / recommendations to interested users for a set of movies. You are required to
The aim of the Movie Recommendation System is to provide informationrecommendations to interested users for a set of movies. You are required to write a Python program that stores, processes, and retrieves information as specified below.
Specifications:
The program should display the following menu:
Movies Recommendation System
Add new Movie information
Update Movie information
Display information for all Movie
Display specific information
Save specific genre in new files
Exit
Adding new movies: This option allows the user to add movie information to the system. The fields for each movie are described in Table Data should be stored in a file called movietxt
Table Data specification
Field Specification Type of data Possible values
MovieID Movie identification String of digits
MovieName Name of the Movie String Rules for Life
MovieAuthor The writer of the Movie String Firstname Lastname
UserRating user rating Float value from to
NumOfReviews Number of reviews Integer
Revenue The revenue of the movie in millions float MM
Year The evaluation year Integer
Genre The domain of the Movie
It might be : sport, : art, : economic, : comedy : fiction and : politics String Sport
Table presents examples of valid data.
Table Examples of Valid data
MovieID MovieName MovieWriter UserRating NumOfReviews Revenue Year Genre
A Wrinkle in Time Time Quintet Madeleine L'Engle M fiction
A Wrinkle in Time Time Quintet Madeleine L'Engle M fiction
UP Disney M Fiction, art
The program should accept only valid names and values. Each Movie should have one record per year. The system should display an appropriate error message if the MovieID already has been reviewed for the same Year. For example, the data presented in Table is not valid. This is because each movie should be reviewed once per a year.
You should ask the user to enter the number corresponding to the movie Genre, then write it in letters. For instance, if the user entered this means the genre is sport and this is how it should be saved in the file. A movie can have up to Genres, so you should ask the user how many Genres he will enter, if he entered a value larger than then you should print an error message, then ask again.
When adding the new movie the MovieID should be automatically assigned. You should check the Movie Name, if the movie has the same name, then you should check the movie year, if the movie name and year are the same you should display an error and not add the movie, get the user back to the main menu. If the movie has the same name but not the same year, then the new id is the old id the date. For instance, movie is created in and the ID is The second review for the same movie is in then the ID should be The first number is just a sequential number. The second number is the date of Review. So to create the movieID you should check if the movie already exist, if it does use the same sequential number ex; else add one to the last existing sequential number and use that ex; check Table
Note that when the user Enter the MovieName, they may use upper or lower case letters, your code should be able to recognize if the same name is entered but with different letters check table
Table Examples of NOT valid data
MovieID MovieName MovieWriter UserRating NumOfReviews Revenue ReviewYear Genre
A Wrinkle in Time Time Quintet Madeleine L'Engle M fiction
A Wrinkle in Time Time Quintet Madeleine L'Engle M fiction
a wrinkle in time time quintet Madeleine L'Engle M fiction
Updating Movie information: this option allows the user to update UserRating, NumOfReviews, and Revenue. Once this option is selected, the program should ask for MovieName and Year, then retrieve Movie information based on MovieName and Year. For each field, the program should ask whether it needs to be updated or not. If it needs to be updated, the program asks for the new information. Once all information is entered, the program updates them and displays an appropriate message. The updated movie should be changed in the file as well.
Displaying information about all Movies: this option allows the user to display Movies information in a nicely formatted table. It has the following suboptions select only of the following suboptions
o Sort by MovieID
o Sort by MovieName
o Sort by Genre
o Sort by Revenue
o Sorted by Year
Displaying specific information: this feature allows the user to display Movies information based on some specified criteria. It has the following suboptions: select only of the following suboptions
View the top selling movies in the last years sorted based on Year and UserRating
Pri
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started