Question: write a Python 3 program or IPython Jupyter Notebook to determine the top three palyers in batting runs(linear weights) for each team in 2016. Consider

write a Python 3 program or IPython Jupyter Notebook to determine the top three palyers in batting runs(linear weights) for each team in 2016.

Consider only players who had at least 300 plate appearances (NOT at bats). use the file Batting2016.csv, downloaded from Fangraphs.com. you may assume no two players on the same team have the same name.

Derive batting runs using the linear weights formula:

(.46 * 1B) + (.80 * 2B) + (1.02 * 3B)+(1.4 * HR) +[0.33*(BB+HBP)]+(0.3*SB)-(0.6*CS)-[0.25*(AB-H)].

where 1B, 2B, 3B, HR are singles, doubles, triples, and homerun. BB is walks, SB is the stolen bases, CS is caught stealing, AB is at bats, and H is hits.

print the top three players in batting runs for each team in 2016. The teams should appear in alphabetical order; the players within each team should be ranked with the highest batting runs first, followed by the second then the third.

Things to complete for full credits:

1. correct folder and file creation

2. read csv lines from data file

3. correctly access data fields

4. design and implementation of appropriate data structure

5. readable output,

6. identify and print correct players

7. calculate correct values for players

8. generalize to print any number of players - not just 3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!