Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 6 Which team have played the most matches since records began? (Ctrl) - . . In this lab you will be tasked with exercising

image text in transcribed
image text in transcribed
image text in transcribed
Question 6 Which team have played the most matches since records began? (Ctrl) - . . In this lab you will be tasked with exercising your key Python programming skills. The Pick & Go Test Match Results Database (http://www.lassen.co.nz/pickandgo.php) contains the results of every international rugby match played since 1875. The following code block reads data from a data file ('RugbyResultsData.csv) scraped from Pick & Go and stores this in a list of dictionary objects, each of which contains the details of a match. The details stored about each match are stored in a dictionary object with the following keys: Weekday. The day of the week on which the match was played Day: The day of the month on which the match was played Month: The month in which the match was played Year. The year in which the match was played Team_1 The home team (three letter country code, eg. IRL = Ireland, NZL = New Zealand) Team_2. The away team (three letter country code, e.g. IRL = Ireland, NZL = New Zealand) Team 1 Score: The score achieved by the home team. Team_2_Score. The score achieved by the away team. Team_1_Tries. The number of tries scored by the home team. Team 2 Tries. The number of tries scored by the away team Neutral: Was the match played at a neutral venue? . . . . . . The following code reads in the data matches = list() count = = 0 with open("RugbyResultsData.csv') as f: for line in f: words = line.split('') match=("Weekday":wordstoj,"Day":int(words[1])."Month":words/2). "Year"int(words[3]),"Team_1":words[4],"Team_2":words[5],"Team_1_Score":int(words[6]),"Team_ 2_Score":int(words[71), "Team_1_Tries":int(words[8]),"Team_2_Tries":int(words[9]). "Neutral":words [10][0]) matches.append(match) count count + 1 print(str(count) +" matches loaded")

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

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Identify the different types of proposals.

Answered: 1 week ago

Question

=+ Are there additional forms of employee representation?

Answered: 1 week ago