## Example movie – a dictionary with keys "name", "year", "director" and "actors" – don't use in the code
# movie = {
#     "name": "Inglourious Basterds",
#     "year": 2009,
#     "director": "Quentin Tarantino",
#     "actors": ["Brad Pitt", "Christoph Waltz", "Michael Fassbender", "Til Schweiger"]
# }

## A list to store the movie entries.
movies = []

## Alternate movies list – uncomment and use if your "addMovie" function doesn't work correctly
# movies = [{'director': 'Quentin Tarantino', 'actors': ['Brad Pitt', 'Christoph Waltz', 'Michael Fassbender', 'Til Schweiger'], 'name': 'Inglourious Basterds', 'year': 2009}, {'director': 'Steven Soderbergh', 'actors': ['George Clooney', 'Brad Pitt', 'Julia Roberts', 'Matt Damon'], 'name': "Ocean's Eleven", 'year': 2001}, {'director': 'David Fincher', 'actors': ['Edward Norton', 'Brad Pitt', 'Helena Bonham Carter', 'Jared Leto'], 'name': 'Fight Club', 'year': 1999}, {'director': 'Guy Ritchie', 'actors': ['Jason Statham', 'Brad Pitt', 'Vinnie Jones', 'Benicio Del Toro'], 'name': 'Snatch.', 'year': 2000}, {'director': 'Joel Coel', 'actors': ['George Clooney', 'John Malchovich', 'Brad Pitt', 'Tilda Swinton'], 'name': 'Burn After Reading', 'year': 2008}, {'director': 'Quentin Tarantino', 'actors': ['John Travolta', 'Samuel L. Jackson', 'Uma Thurman', 'Bruce Willis'], 'name': 'Pulp Fiction', 'year': 1994}]

## (1): The function adds a movie entry into "movies" list as a dictionary corresponding to the format on lines 2–7
def addMovie(name, year, director, actors):
    # FILL IN

addMovie("Inglourious Basterds", 2009, "Quentin Tarantino", ["Brad Pitt", "Christoph Waltz", "Michael Fassbender", "Til Schweiger"])
addMovie("Ocean's Eleven", 2001, "Steven Soderbergh", ["George Clooney", "Brad Pitt", "Julia Roberts", "Matt Damon"])
addMovie("Fight Club", 1999, "David Fincher", ["Edward Norton", "Brad Pitt", "Helena Bonham Carter", "Jared Leto"])
addMovie("Snatch.", 2000, "Guy Ritchie", ["Jason Statham", "Brad Pitt", "Vinnie Jones", "Benicio Del Toro"])
addMovie("Burn After Reading", 2008, "Joel Coel", ["George Clooney", "John Malchovich", "Brad Pitt", "Tilda Swinton"])
addMovie("Pulp Fiction", 1994, "Quentin Tarantino", ["John Travolta", "Samuel L. Jackson", "Uma Thurman", "Bruce Willis"])

print movies # prints the list of movies corresponding to the alternate "movies" list on the line 14

## (2): The function prints a formatted movie entry on three lines according to the example at the end of this exercise (lines 41–43)
# def printMovie(movie):
#     # FILL IN
# 
# printMovie(movies[0]) # prints:
# # Inglourious Basterds by Quentin Tarantino
# # Year: 2009
# # Cast: Brad Pitt, Christoph Waltz, Michael Fassbender, Til Schweiger

## (3): The function prints formatted entries of every movie in the "movies" list. Use the "printMovie" function.
# def printAllMovies():
#     # FILL IN
# 
# printAllMovies() # prints the movie entries in a correspoding format

## (4): The function returns a list with the names of all the movies made by a specified "director".
# def listDirectorMovies(director):
#     # FILL IN
# 
# print listDirectorMovies("Quentin Tarantino") # ['Inglourious Basterds', 'Pulp Fiction']

## (5): The function returns a list with the names of all the movies with specified "actors".
# def findMoviesWithActors(actors):
#     # FILL IN
# 
# print findMoviesWithActors(["Brad Pitt", "George Clooney"]) # ["Ocean's Eleven", 'Burn After Reading']
# print findMoviesWithActors(["Brad Pitt"]) # ['Inglourious Basterds', "Ocean's Eleven", 'Fight Club', 'Snatch.', 'Burn After Reading']

## (6 - bonus): The function returns a list of all the actors in "movies" list (no duplicates) sorted alphabetically. You don't have to sort the names by the last name, the whole name is enough.
# def listActors():
#     # FILL IN
# 
# print listActors() # ['Benicio Del Toro', 'Brad Pitt', 'Bruce Willis', 'Christoph Waltz', 'Edward Norton', 'George Clooney', 'Helena Bonham Carter', 'Jared Leto', 'Jason Statham', 'John Malchovich', 'John Travolta', 'Julia Roberts', 'Matt Damon', 'Michael Fassbender', 'Samuel L. Jackson', 'Til Schweiger', 'Tilda Swinton', 'Uma Thurman', 'Vinnie Jones']