View the step-by-step solution to:

# Year 2001 2001 2002 2003 2005 2006 2006 2006 2007 2008 2009 2010 2011 2013 2014 2015 2017 2017 Title The Shawshank Redemption The Godfather The...

Create dictionary that contains the following movie details. Hint: Use lists to store the director's name, title and runtime.

1.

Take a year as an input from the user. Search the dictionary and output the movie title(s) and director(s) of that year.

Output N/A if the year is invalid or if no movie exists for that year.

Sample run:

Enter a year between 2001 and 2017:

2006

Schindler's List, Steven Spielberg

The Lord of the Rings: The Return of the King, Peter Jackson

2.

After step 2, display a menu that enables a user to display the movies sorted by year, director, movie title or runtime. Each option is represented by a single character.

Sample run:

Enter a year between 2001 and 2017:

2006

Schindler's List, Steven Spielberg

The Lord of the Rings: The Return of the King, Peter Jackson

Sort by:

y - Year

d - Director

t - Movie title

r - Runtime

q - Quit

Choose an option: <User input>

3.

Implement all the sorting methods (year, director, movie title or runtime).

Note: There is a newline and a tab between the label and the details.

Sample run 1:

Enter a year between 2001 and 2017:

2006

Schindler's List, Steven Spielberg

The Lord of the Rings: The Return of the King, Peter Jackson

Sort by:

y - Year

d - Director

t - Movie title

r - Runtime

q - Quit

Choose an option:

y

2001:

The Shawshank Redemption, Frank Darabont

The Godfather, Francis Ford Coppola

2002:

The Godfather (Part 2), Francis Ford Coppola

2003:

The Dark Knight, Christopher Nolan

2005:

12 Angry Men, Sidney Lumet

...

Sample run 2:

Enter a year between 2001 and 2017:

2006

Schindler's List, Steven Spielberg

The Lord of the Rings: The Return of the King, Peter Jackson

Sort by:

y - Year

d - Director

t - Movie title

r - Runtime

q - Quit

Choose an option:

d

Anthony Russo:

Avengers Infinity Wars, 2017

Christopher Nolan:

The Dark Knight, 2003

Inception, 2009

Interstellar, 2013

David Fincher:

Fight Club, 2008

...

Sample run 3:

Enter a year between 2001 and 2017:

2006

Schindler's List, Steven Spielberg

The Lord of the Rings: The Return of the King, Peter Jackson

Sort by:

y - Year

d - Director

t - Movie title

r - Runtime

q - Quit

Choose an option:

t

12 Angry Men:

Sidney Lumet, 2005

Avengers Infinity Wars:

Anthony Russo, 2017

Dragon Ball Z: Battle of the Gods:

Masahiro Hosoda, 2017

...

Sample run 4:

Enter a year between 2001 and 2017:

2006

Schindler's List, Steven Spielberg

The Lord of the Rings: The Return of the King, Peter Jackson

Sort by:

y - Year

d - Director

t - Movie title

r - Runtime

q - Quit

Choose an option:

r

88:

The Lion King , Roger Allers

94:

Pulp Fiction, Quentin Tarantino

96:

12 Angry Men, Sidney Lumet

...

Year
2001 2001 2002
2003
2005
2006 2006
2006
2007
2008
2009
2010
2011
2013 2014
2015 2017
2017 Title
The Shawshank Redemption The Godfather The Godfather [Part 2]
The Dark Knight
12 Angry Men
Schindler's List
The Lord of the Rings: The Return of the
King
Pulp Fiction
The Good, the Bad and the Ugly
Fight Club
Inception
The Lord ofthe Rings: The Two Towers
Life Is Beautiful
Interstellar
Terminator 2
The Lion King
Avengers Infinity Wars
Dragon Ball 2: Battle of the Gods Director
Frank Darabont
Francis Ford
Coppola
Francis Ford
Coppola
Christopher Nolan
Sidney Lumet
Steven Spielberg Peter Jackson
Quentin Tarantino
Sergio Leone
David Fincher
Christopher Nolan
Peter Jackson
Roberto Benigni
Christopher Nolan
James Cameron
Rogergvllm
Anthony Russo
Masahiro Hosoda Runtimelminutes]
142 175 202
152
96
195 201
94
178
139
148
179
116
169 137
88 137
105

### Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

### -

Educational Resources
• ### -

Study Documents

Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

Browse Documents