Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please code in python 3.7 and fit into skeleton code link given https://www.cse.msu.edu/~cse231/Online/Projects/Project06/Scoring_per_Game.csv shots_taken (master_list)---> list of tuples a. This function accepts as input the

image text in transcribed

please code in python 3.7 and fit into skeleton code link given image text in transcribed

https://www.cse.msu.edu/~cse231/Online/Projects/Project06/Scoring_per_Game.csv

shots_taken (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: (shots taken, player name) The list will be sorted on shots taken (highest to lowest) and only the top ten are returned, i.e. the list contains ten tuples in decreasing, sorted order. The shots taken is in the column labeled S. As in the previous function, some players have taken over a thousand shots so commas appear in the values so again you must remove the comma and convert to an integer before sorting. However, the new challenge in this function is that some data is missing (indicated by a pair of hyphens "--") so you must skip that data, i.e. ignore that player. In the earlier years of the NHL this data wasn't recorded. (Optional: if you want a further challenge, you can write this function in one line; list comprehension is useful.) 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() shots_taken (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: (shots taken, player name) The list will be sorted on shots taken (highest to lowest) and only the top ten are returned, i.e. the list contains ten tuples in decreasing, sorted order. The shots taken is in the column labeled S. As in the previous function, some players have taken over a thousand shots so commas appear in the values so again you must remove the comma and convert to an integer before sorting. However, the new challenge in this function is that some data is missing (indicated by a pair of hyphens "--") so you must skip that data, i.e. ignore that player. In the earlier years of the NHL this data wasn't recorded. (Optional: if you want a further challenge, you can write this function in one line; list comprehension is useful.) 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()

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

How is AI impacting human history and our lives now?

Answered: 1 week ago

Question

4.2 Probability Distributions for Discrete Random Variables

Answered: 1 week ago