Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please code in python 3.7 and make fit in skeleton code given below. link is given below also https://www.cse.msu.edu/~cse231/Online/Projects/Project06/Scoring_per_Game.csv !!! Insert heading comments here.'' import
please code in python 3.7 and make fit in skeleton code given below. link is given below also
https://www.cse.msu.edu/~cse231/Online/Projects/Project06/Scoring_per_Game.csv
!!! Insert heading comments here.'' import csv def open_file(): "''Insert docstring here.'' pass # insert your code here def read_file(fp): "I'Insert docstring here.!!! pass # insert your code here def shoots_left_right(master_list): '''Insert docstring here.'' pass # insert your code here def position (master_list): "''Insert docstring here.'' pass # insert your code here def off_side_shooter (master_list): "''Insert docstring here.'' pass # insert your code here def points_per_game (master_list): "''Insert docstring here.'' pass # insert your code here def games_played (master_list): "''Insert docstring here.'' pass # insert your code here def shots_taken (master_list): "''Insert docstring here.'' pass # insert your code here def main(): "''Insert docstring here.'' pass # insert your code here if == " main ": name main() points_per_game (master_list)---> list of tuples a. This function accepts as input the master list and returns a sorted list of tuples where each tuple is of the form: (points-per-game, player name, position) The list will be sorted on points-per-game (highest to lowest) and only the top ten are returned, i.e. the list contains ten tuples in decreasing, sorted order. The player name is in the first column, i.e. labeled Player" whereas the points-per-game is in the column labeled P/GP (which stands for Points/Games_Played). You must convert points-per- game to a float before sorting. Python sorts on the first item in the tuple (which is what you want in this case). Remember to sort in decreasing order. You can use slicing to extract the first (top) ten from the sorted list. (Optional: if you want a challenge, you can write this function in one line; list comprehension is useful.) b. Parameters: master_list (list of lists) c. Returns : list of tuples d. The function displays nothing. !!! Insert heading comments here.'' import csv def open_file(): "''Insert docstring here.'' pass # insert your code here def read_file(fp): "I'Insert docstring here.!!! pass # insert your code here def shoots_left_right(master_list): '''Insert docstring here.'' pass # insert your code here def position (master_list): "''Insert docstring here.'' pass # insert your code here def off_side_shooter (master_list): "''Insert docstring here.'' pass # insert your code here def points_per_game (master_list): "''Insert docstring here.'' pass # insert your code here def games_played (master_list): "''Insert docstring here.'' pass # insert your code here def shots_taken (master_list): "''Insert docstring here.'' pass # insert your code here def main(): "''Insert docstring here.'' pass # insert your code here if == " main ": name main() points_per_game (master_list)---> list of tuples a. This function accepts as input the master list and returns a sorted list of tuples where each tuple is of the form: (points-per-game, player name, position) The list will be sorted on points-per-game (highest to lowest) and only the top ten are returned, i.e. the list contains ten tuples in decreasing, sorted order. The player name is in the first column, i.e. labeled Player" whereas the points-per-game is in the column labeled P/GP (which stands for Points/Games_Played). You must convert points-per- game to a float before sorting. Python sorts on the first item in the tuple (which is what you want in this case). Remember to sort in decreasing order. You can use slicing to extract the first (top) ten from the sorted list. (Optional: if you want a challenge, you can write this function in one line; list comprehension is useful.) b. Parameters: master_list (list of lists) c. Returns : list of tuples d. The function displays nothing
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started