file/screen-shot XXXXXXXXXXat-32839-pm-jijpotr4-sdkjm2ci.png file/screen-shot XXXXXXXXXXat-32933-pm-dwniivss-0o1p51to.png file/screen-shot XXXXXXXXXXat-33731-pm-vhjpj4fu-jrlfcoqj.png file/screen-shot...

1 answer below »
pfa


file/screen-shot-2021-04-01-at-32839-pm-jijpotr4-sdkjm2ci.png file/screen-shot-2021-04-01-at-32933-pm-dwniivss-0o1p51to.png file/screen-shot-2021-04-01-at-33731-pm-vhjpj4fu-jrlfcoqj.png file/screen-shot-2021-04-01-at-33740-pm-nc12jq2j-3gx2uie0.png file/The first four functions you are to implement are helper functions.docx The first four functions you are to implement are helper functions, meaning they are written to help you implement other functions. You can use these functions in the 5th and 6th function. It is suggested that you implment these four first. The following are the 4 helper functions you are to implement. All four functions should take an argument calledmoviethat is a list that contains the the movie’s corresponding values in the following order: [movie name, gross earning, year, rating out of 10, number of ratings]. 1.get_name(movie).{python} The get_name function should return the name of the provided list. 2. get_gross(movie).{python} Theget_grossfunction should return the gross earnings of the provided list. 3. get_rating(movie).{python} Theget_ratingfunction should return the rating of the provided list. 4. get_num_ratings(movie).{python} Theget_num_ratingsfunction should return the number of ratings of the provided list. 3.2better_movies(movie_name, lst).{python} Themovie_nameis a string whose value is corresponding to a movie_name inlst. Thelstis a list of lists, where the lists inside the list comprises of a movie’s information in the following order: [movie name, gross earning, year, rating out of 10, number of ratings]. Thebetter_moviesfunction should take the providedmovie_nameand search through the providedlstand return a list of all movies’ information that have a higher rating than that ofmovie_name. Assume that themovie_namegiven will always be in the providedlst. 3.3average(category, lst).{python} Thecategoryis 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. Thelstis a list of lists, where the lists inside the list comprises of a movie’s information in the following order: [movie name, gross earning, year, rating out of 10, number of ratings]. Theaveragefunction will return the average for all movies based on the provided category. For example, ifcategoryis equal to “rating”, this function will return the average of all ratings inlst. 3.4Style matters In addition to functional correctness, some points will be reserved for 1. having good variable names 2. having meaningful docstrings for all functions you write
Answered Same DayJun 28, 2021

Answer To: file/screen-shot XXXXXXXXXXat-32839-pm-jijpotr4-sdkjm2ci.png file/screen-shot...

Atal Behari answered on Jun 29 2021
136 Votes
The first four functions you are to implement are helper functions, meaning they are written to help you implement other functions. You can use these functions in the 5th and 6th function. It is suggested that you implment these four first. The following are the 4 helper functions you are to implement.
All four functions should take an argument calledmoviethat is a list that contains the the movie’s corresponding values in the following order: [movie name, gross earning, year, rating out of 10, number of ratings]. 1.get_name(movie).{python}
The get_name function should return the name of the provided list.
2. get_gross(movie).{python}
Theget_grossfunction should return the gross earnings of the provided list.
3. get_rating(movie).{python}
Theget_ratingfunction should return the rating of the provided list.
4. get_num_ratings(movie).{python}
Theget_num_ratingsfunction should return the number of ratings of the provided list.
3.2better_movies(movie_name, lst).{python}
Themovie_nameis a string whose value is corresponding to a movie_name inlst.
Thelstis a list of lists, where the lists inside the list comprises of a movie’s information in the following order: [movie name, gross earning, year, rating out of 10, number of ratings].
Thebetter_moviesfunction should take the providedmovie_nameand search through the providedlstand return a list of all movies’ information that have a higher rating than that ofmovie_name. Assume that themovie_namegiven will always be in the providedlst.
3.3average(category, lst).{python}
Thecategoryis a string whose value will either be “rating”, “gross’, or”number of...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here