CPSC 1301Assignment 7 – Introduction to Programming using Python

$25.00

Category: Tags: , , , , You will Instantly receive a download link for .zip solution file upon Payment || To Order Original Work Click Custom Order?

Description

5/5 - (2 votes)

This assignment focuses on writing functions that manipulate 2D lists and files. We will do a movie review app.Assignment SpecificationsUsing notepad, create a movies.txt file that contains the following linesStar Wars – A New HopeGeorge LucasDarth Vader19775Awesome movie!The GodfatherFrancis Ford CoppolaMichael Corleone19725Great movie! I like it!Good stuff :)The above are records for the original releases of Star Wars and the Godfather. Each record holds the movie’s title, director, main character, release date, star rating (1 – 5), and a number of reviews.Records are separated by blank lines.Write a Python program that reads the above movies.txt file into a 2D list. Each row of the list will hold the full record for a movie. Have the program display the 2D list and then provide the user with the following menu options (the menu must redisplay itself, unless the user choose to quit the program):- Add a movie to the list- Select a movie and add your comment to it- Select a movie and change its rating- Save the list back to the file- Exit the program (be sure to save the list before exiting)

We will need to code a function for each of the above options. So the app will have five functions, in addition to main(). The headers of these functions might look like thisdef addMovie(my_list):def addMovieComment(my_list, movie_index, new_comment):def changeRating(my_list, movie_index, new_rating):def saveAllMovies(my_list, file_name):def exitProgram(myList):Assignment Notes1.We can use the reference code in CougarVIEW, under Resources>Sample Programs to see how we could handle 2D lists.Suggestions1.Solve the problem using pencil and paper first.You cannot write a program until you have figured out how to solve the problem. 2.Write a simple version of the program.3.Run the program and track down any errors.Suggested Procedure·Use IDLE to create a new program. Name the file as < last name>_<first name>_Assignment7.py>, e.g., blogg_Joe_Assignment7.py·Your program MUST have the following header comment lines as the first lines in your source code file:# Purpose: This program manipulates lists and files# Author(s): < your name >#Date: <date you completed the program>·Write your program and run it. Track down any errors and fix them. Run the program with different sets of input data and make sure it produces outputs that match your expectation (you should use pencil and paper to calculate the output values manually first)·Use the Assignment 7 submission folder in CougarView to turn in your program well before the deadline. If you submit multiple times, only the most recently submitted version will be graded.What to submitSubmit a zip file containing your .py source code file and your movies.txt file in the Assignment7 submission folderin CougarView