Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Program: Sorting movies (Lists and Dictionaries) (Python 3) (1) Build a dictiona

ID: 3592777 • Letter: P

Question

Program: Sorting movies (Lists and Dictionaries) (Python 3)

(1) Build a dictionary that contains the movie collection below. Hint: Combine movie title and director into a list.

(2) Prompt the user for a single year and output the movie title(s) and director(s) from that year. Output N/A if the year is invalid. (4 pts)

Ex:

(3) After prompting the user for a year and displaying the title(s) and directors(s) from that year, display a menu. The menu enables a user to display the movies sorted by year, director, or movie title. Each option is represented by a single character.

The program initially outputs the menu, and outputs the menu after a user chooses an option. If an invalid character is entered, continue to prompt for a valid choice. The program ends when the user chooses the option to Quit. Hint: Implement Quit before implementing other options. For this step, the other options do nothing. (1 pt)

Ex:

(4) Implement the sort by year menu option. Note: There is a newline and a tab between the year and the movie title/director. (2 pts)

Ex:

(5) Implement the sort by director menu option. For directors with multiple films on the list, order their films by year. Note: There is a newline and a tab between the director's name and the movie title/year. (3 pts)

Ex:

(6) Implement the sort by movie title menu option. Note: There is a newline and a tab between the movie title and the movie director/year. (2 pts)

Ex:

Explanation / Answer

#end for loop

import csv,os,shutil,difflib