This take-home exam/project is designed to test your python skills learned throughout the course so far. Your task is to write code that uses the attached scores.txt.• Your final output should be a...

This take-home exam/project is designed to test your python skills learned throughout the course so far. Your task is to write code that uses the attached scores.txt.• Your final output should be a csv file that when opened in MS Excel shows a league table that looks something like this example:Team P W D L GF GA GD PTSChelsea 27 18 6 3 49 21 28 60Arsenal 27 18 5 4 52 27 25 59Manchester City 27 18 3 6 69 27 42 57Liverpool 27 17 5 5 70 35 25 56Tottenham Hotspur 27 15 5 7 36 33 3 50where:P = games playedW = games wonD = games drawnL = games lostGF = goals scoredGA = goals concededGD = goal differencePTS = points: 3 points for a win, 1 point for a draw, 0 points for a lossThere are different ways of executing this task. You could use the dbf file of the scores.txt you already have and work with cursors or potentially parse the text file into say lists and do it that way. Do whatever you are comfortable with and get as close as you can to the required output. The closer you are to the required output the more points you get. More points also for modularizing you code. Extra credit: Read the scores.txt to create a csv output file of the top goal scorers list, sorted by player with most goals. When opened in MS Excel the list should look something like this example:Player Team GoalsLuis Suárez Liverpool 23Daniel Sturridge Liverpool 18Sergio Agüero Manchester City 15Yaya Touré Manchester City 13Loïc Remy Newcastle United 12


Stadium HomeTeam HomeGoals AwayTeam AwayGoals HomeScorers AwayScorers Bombonera Boca 2 Independiente 1 Garcia,Spinelli Bonatti Perón Racing 1 River 0 Cerezo Monumental River 2 Boca 0 Angoti,Agnoti Libertadores Independiente 0 Racing 0 Monumental River 2 Independiente 1 Taggino,Valentini Laminque Monumental River 3 Boca 3 Agnoti,Taggino,Agnoti Garcia,Garcia,Calomino Perón Racing 4 Independiente 1 Cerezo,Giraldi,Lamelas,Cerezo Laminque Libertadores Independiente 2 Boca 1 Bidone,Giovanelli Calomino Monumental River 5 Racing 3 Giraldi,Gonzalez,Agnoti,Giraldi,Leal Lamelas,Cerezo,Cerezo Bombonera Boca 0 Racing 0 Bombonera Boca 2 Racing 1 Spinelli,Garcia Lamelas Libertadores Independiente 1 River 1 Laminque Agnoti Geography 476: Introduction to GIS Spring 2019 :: The University of North Dakota Python Project/Take-home Exam Assigned: April 22, 2019 :: Due: May 7, 2019 @ 11.59pm Total Points = 100 This take-home exam/project is designed to test your python skills learned throughout the course so far. Your task is to write code that uses the attached scores.txt. • Your final output should be a csv file that when opened in MS Excel shows a league table that looks something like this example: Team P W D L GF GA GD PTS Chelsea 27 18 6 3 49 21 28 60 Arsenal 27 18 5 4 52 27 25 59 Manchester City 27 18 3 6 69 27 42 57 Liverpool 27 17 5 5 70 35 25 56 Tottenham Hotspur 27 15 5 7 36 33 3 50 where: P = games played W = games won D = games drawn L = games lost GF = goals scored GA = goals conceded GD = goal difference PTS = points: 3 points for a win, 1 point for a draw, 0 points for a loss There are different ways of executing this task. You could use the dbf file of the scores.txt you already have and work with cursors or potentially parse the text file into say lists and do it that way. Do whatever you are comfortable with and get as close as you can to the required output. The closer you are to the required output the more points you get. More points also for modularizing you code. Extra credit: Read the scores.txt to create a csv output file of the top goal scorers list, sorted by player with most goals. When opened in MS Excel the list should look something like this example: Player Team Goals Luis Suárez Liverpool 23 Daniel Sturridge Liverpool 18 Sergio Agüero Manchester City 15 Yaya Touré Manchester City 13 Loïc Remy Newcastle United 12 Good luck!
May 03, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here