https://github.com/CSU-CS150B/CS150B-Lab-Instructions/blob/main/NBAPractical.md https://docs.google.com/spreadsheets/d/1JodpSrqg4y8To8-EGos9x1WtggSX9SLZOtuApQwgYlM/edit?gid=2091943793#gid=2091943793 import csv # These are used to help you manage the CSV please do not change!input_handler = {    "field goal": 10,    "3 point": 13,    "2 point": 16,    "free throw": 20} # This code assigns index_stat to the index of whatever value you enter.index_stat = -9999 # _______Begin student work after this line________ # These variables can be used to track the index of of certain values in the csv. # Use if you want.# index_name = ?# index_age = ?# index_team = ? # Goal: take in a string containing a file name -> return a list of lists from a csv reader objectdef read_csv(filename):    pass # Goal: take in a team name and the dataset -> return a list of lists containing only player from the # specified team.def filter_data(team_name, data):    pass # For a given statistic find the player with the highest average.def find_best_player(data, index):    pass # For a given statistic find the player with the lowest average.def find_worst_player(data, index):    pass # Find the average age of all player on the team.# Return as an integer.def average_age(data):    pass # Compare a players age to the teams average. Return a string based on result.def compare_age(average, player):    pass # Print info for a given player.def print_info(player, skill_level, stat, team_age):    pass # Handles the printing of all the teams data.def print_stats(data, name, stat_type):    pass def main():    # Get user input    user_team = input("Enter your favorite team: ")    print("Stat types: [Free Throw | Field Goal | 3 Point | 2 Point]")    stat_type = input("Chose stat: ")        # This code handles changing the index based on the users input    global index_stat    index_stat = input_handler.get(stat_type.lower())    if index_stat is None or index_stat < 0:        print("Invalid stat type.")        return -1        # Your work starts here             # Do not delete this. It may look like this is cause your error but I promise that it is not.if __name__ == '__main__':    main()

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

https://github.com/CSU-CS150B/CS150B-Lab-Instructions/blob/main/NBAPractical.md

https://docs.google.com/spreadsheets/d/1JodpSrqg4y8To8-EGos9x1WtggSX9SLZOtuApQwgYlM/edit?gid=2091943793#gid=2091943793

import csv

# These are used to help you manage the CSV please do not change!
input_handler = {
    "field goal": 10,
    "3 point": 13,
    "2 point": 16,
    "free throw": 20
}

# This code assigns index_stat to the index of whatever value you enter.
index_stat = -9999

# _______Begin student work after this line________

# These variables can be used to track the index of of certain values in the csv. 
# Use if you want.
# index_name = ?
# index_age = ?
# index_team = ?


# Goal: take in a string containing a file name -> return a list of lists from a csv reader object
def read_csv(filename):
    pass


# Goal: take in a team name and the dataset -> return a list of lists containing only player from the 
# specified team.
def filter_data(team_name, data):
    pass


# For a given statistic find the player with the highest average.
def find_best_player(data, index):
    pass


# For a given statistic find the player with the lowest average.
def find_worst_player(data, index):
    pass


# Find the average age of all player on the team.
# Return as an integer.
def average_age(data):
    pass


# Compare a players age to the teams average. Return a string based on result.
def compare_age(average, player):
    pass


# Print info for a given player.
def print_info(player, skill_level, stat, team_age):
    pass


# Handles the printing of all the teams data.
def print_stats(data, name, stat_type):
    pass


def main():
    # Get user input
    user_team = input("Enter your favorite team: ")
    print("Stat types: [Free Throw | Field Goal | 3 Point | 2 Point]")
    stat_type = input("Chose stat: ")
    
    # This code handles changing the index based on the users input
    global index_stat
    index_stat = input_handler.get(stat_type.lower())
    if index_stat is None or index_stat < 0:
        print("Invalid stat type.")
        return -1
    
    # Your work starts here
    
    
    

# Do not delete this. It may look like this is cause your error but I promise that it is not.
if __name__ == '__main__':
    main()

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY