1. get_name(movie)
The get_name function should return the name in the provided list.
2. get_gross(movie)
The get_gross function should return the gross earnings in the provided list.
3. get_rating(movie)
The get_rating function should return the rating in the provided list.
4. get_num_ratings(movie)
The get_num_ratings function should return the number of ratings in the provided list.
3.2 better_movies(movie_name, movies_list)
The movie_name is a string whose value is corresponding to a movie_name in movies_list.
The movies_list is a list of lists, where the lists inside the larger list contain a movie’s
information in the following order: [movie name, gross earning, year, rating out of 10, number of
ratings].
The better_movies function should take the provided movie_name and search through the
provided movies_list and return a list of all movies’ information that have a higher rating than
that of movie_name. Assume that the movie_name given will always be in the provided list.
3.3 average(category, movies_list)
The category is a string whose value will either be "rating", "gross’, or "number of ratings". We
will not provide any other string values than those three to this function.
The movies_list is a list of lists, where the lists inside the larger list contain a movie’s
information in the following order: [movie name, gross earning, year, rating out of 10, number of
ratings].
The average function will return the average for all movies based on the provided category. For
example, if category is equal to "rating", this function will return the average of all ratings in
movie_list.
when accessing movie information, you should use your helper functions: (get_name,
get_rating, etc.) rather than direct indexing. This is because it makes our code easier to
read without knowing how the data is organized.