Question: Notes: Use the same documentation and design rules as stated in previous assignments. Data file movies.txt contains movie data. Each data set has a movie
Notes:
Use the same documentation and design rules as stated in previous assignments.
Data file movies.txt contains movie data. Each data set has a movie name and a rating on a line separated by a comma. The number of data sets is unknown and code should work for any data file. Code may assume the data is valid and there are no commas in the movie title.
Main function code should use two parallel lists to store the related data. Read the lines from the file and fill the lists.Write an efficient sentinelcontrolled loop that allows the user to display titlerating data in a neat chart followed by the number of movies and average rating with decimals. append new titlerating data, and remove existing titlerating data. Report appropriate error messages if the user tries to append a title that already exists, tries to remove a title that does not exist, or enters an invalid rating not in range
Include the following functions. Do not change the function headings or purpose. Include the comments. Other functions may be added as desired.
Include the main function at the top of the code. def main :
Write a void function menu that displays the menu of choices.
def menu :
# display menu
Write a void function display that produces the report when the user selects choice This function is passed the two parallel lists.
# display titles and ratings in columns followed by count and average def display titleslist, ratingslist;
Grading Constraints:
Use of global variables is not accepted.
Infinite whileTrue loops or loops using jump statements such as break, continue are not accepted.
The data file should not be altered.
Advanced coding structures not yet covered should not be used. This assessment covers use of parallel lists.
Grading Rubric:
Commenting is done per description in previous projects. pts
Variables are named and used appropriately. pts
The main function is called correctly. pts
The menu function is written and called correctly. pts
The display function is written and called correctly. pts
The two parallel lists are read correctly from the file. pts
The report makes a neat chart and displays the count and average rating. pts
The append code is correct and displays error messages as requested. pts
The remove code is correct and displays error messages as requested. pts
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
