Facing tough competition from IP-owning competitors like Disney,…

Question Answered step-by-step Facing tough competition from IP-owning competitors like Disney,…  Facing tough competition from IP-owning competitors like Disney, the once reigning champion of streaming, Netflix, is wanting to improve their offerings. In this assignment you will process data from a database of Netflix shows and movies to learn something about its offerings. The data is from the US Netflix content library, taken in May 2022 and available from Kaggle (Links to an external site.). (We are providing the link to Kaggle for your interest, FYI, but you do NOT need to become a member there). We’ve modified the data (removing rows/columns and formatting) to make it easier for you to work with.Data File The CSV data  ( https://1drv.ms/u/s!AgkfGBOH7O0Ampd-YB9AinxBMoQ67w?e=PnB1m7) containing information about the content library on the US Netflix.  For clarity, this document will refer to the data file’s column names in italics.The first row has the title for each column, most of which are self explanatory.Note: IMDb stands for the Internet Movie Database (https://www.imdb.com/ (Links to an external site.)) (We are providing this link only FYI)Each row after the first one contains data about a particular title. You can assume that in this database titles are uniquely identified by any of their id, title, or imbd_id, individually.Have a careful look through the data file and make sure you understand how it is structured before starting the exercise. Also carefully check the sample output which complements the exercise description.This exercise is broken down into two parts, which should be included, in order, in a single Python file named netflix.py.Part 1: Overall DataYour program should output the following information (in this order):A greeting message to the user.Aggregate information over all offerings, broken down by type:For movies, report the total number of movies (i.e. the number of rows with type ‘MOVIE’) and their average rating (average of their imdb_score)For shows, report the total number of shows (i.e. the number of rows with type ‘SHOW’), their average rating (average of their imdb_score), and average number of seasons (average of their seasons)The number of either shows or movies with imdb_score greater or equal than 9.HintsTo print data in columns use the Python .format() mini-language (Links to an external site.). Here are a couple of examples.print(“{:<10}".format("weasel")) prints the string "weasel" so that it is left-aligned in a 10 character-wide columnprint("{:>6.1f}”.format(42.367)) prints the number 42.367 to one decimal place, right-aligned in a 6 character-wide columnSample OutputHere is sample output showing the data for the first few decades in the CSV file:Welcome to the Netflix report!Total number of movies:    3398Average IMDb rating:       6.27Total number of shows:     1875Average IMDb rating:       7.02Average number of seasons: 2.24Number of offerings with a score of at least 9: 21NotesFor this exercise you must not use any functions nor methods in other modules such as those specialized in manipulating CSV files.Part 2: User InteractionIn your same netflix.py file, underneath your solution to Part 1, write code to do the following: Print a title, or some other output to obviously separate Part 2 output from Part 1 output. Do not do this by clearing the screen or printing lots of empty lines.Ask the user to enter a movie or show, by giving the title.If the entered movie or show is in the file, print the following information (in this order):The genre, type (uncapitalized), title (properly captitalized), year, imdb_score and imdb_votesThen, for every title of the same type and genre, print the following information in properly formatted columns:The title, imdb_score, and difference between its imdb_score and the imdb_score of the movie/show the user asked about.Note: do not include the movie/show the user asked about in this list!If the entered movie or show was not in the file print a message indicating this.HintsYou may have to process the file more than once. To do so, when your program finishes reading the file, call the method seek(0) to start reading from the beginning of the file again (e.g., suppose data_file is the variable referring to the data file, data_file.seek(0) will allow you to read the file from the first character, and therefore the first line, again).NotesYou are NOT allowed to use dictionaries for this exerciseWe recommend that you do NOT save the whole file as a big list in memoryWe also recommend that you do NOT save the results to be printed to the user as a big list in memorySample OutputHere is the output for two sample runs: (What the user types is highlighted to aid this description)Sample Run 1———————————————————Please enter a title you would like to know more about: johnny MnemonicThe scifi movie Johnny Mnemonic was released in 1995. It has a 5.6 rating on imdb with 71062 votes.Here’s how it stacks up with other scifi movies on Netflix:Title                                                                                            IMDb score     +/-Teenage Mutant Ninja Turtles                                                         6.7    -1.1Mobile Suit Gundam II: Soldiers of Sorrow                                            7.2    -1.6Mobile Suit Gundam: Char’s Counterattack                                             7.3    -1.7Starship Troopers                                                                    7.3    -1.7Teenage Mutant Ninja Turtles II: The Secret of the Ooze                              6.0    -0.4Hollow Man                                                                           5.8    -0.2Neon Genesis Evangelion: The End of Evangelion                                       8.0    -2.4Double Team                                                                          4.7     0.9Inception                                                                            8.8    -3.2The One                                                                              5.9    -0.3G.O.R.A.                                                                             8.0    -2.4Battleship                                                                           5.8    -0.2Tiger & Bunny: The Beginning                                                         6.7    -1.1Zokkomon                                                                             3.9     1.7Tiger & Bunny: The Rising                                                            6.8    -1.2Expelled from Paradise                                                               6.7    -1.1Chappie                                                                              6.8    -1.2Spectral                                                                             6.3    -0.7Advantageous                                                                         6.2    -0.6…Sample Run 2———————————————————Please enter a title you would like to know more about: PrimerIt looks like that this title is not on Netflix.Notes:Like Part 1, you must not use any functions nor methods in other modules such as those specialized in manipulating CSV files.You may reuse the code you wrote in Part 1 to help you get started in Part 2.Your program must accept any case for the user input. For example, lord of the rings, LORD OF THE RINGS, and LoRd oF tHe RiNgS would all be recognized as the same movie. Leading and trailing spaces and punctuation marks including .,?! in the input should also be ignored.General NotesIf working in IDLE or other local environment remember to include your data file in the same folder where you are developing and testing your program.Just submit your .py file. Do NOT submit other files (such as the CSV file).We may use a different data file (but with the same file name and structure) to mark your assignment’s correctness. So do NOT “hard code” anything.You must write Python code that calculates and prints out the answers to the questions, by processing the CSV file in your program. You get no points just for providing the exact answers by calculating the answers in Excel and printing them.At this point we are requiring you not to use specialized modules (e.g., providing CSV file manipulation methods) because one objective of this coding exercise is for you to practice with basic text file manipulation. We will work with modules later in the course.If your program does not run (i.e. crashes or produces an error), your mark will be calculated using the rubric and then multiplied by 0.5. To avoid this penalty, try to start early so you can get help from the teaching team if needed! It is better to submit code that works perfectly but doesn’t contain all the features, than one that has all the features (potentially) but crashes. Computer Science Engineering & Technology Python Programming CSC CSC-110 Share QuestionEmailCopy link Comments (0)