Question: IN PYTHON i saw a soultion one here but did not come out correct on my end In this assignment, you will read some data

IN PYTHON i saw a soultion one here but did not come out correct on my end

In this assignment, you will read some data from a CSV file and perform some data processing and print the results in a text file.

You will save your assignment code as ISM3115Assign6ByLastNameFirstName.py and submit it.Add a single line comment that says This is assignment 6 by

Add a multi-line comment that says In this assignment I will learn how to read data from a CSC file, how to process that data and how to write the processed data in an output file

Please break up the above comment into multiple lines (two or more).

Open an output text file called OlympicVenuesByYear.txt

Next, read a CSV file called SummerOlympicsData.csv provided with this assignment.

This data file has eight fields City, Year, Sport, Discipline, Country, Gender and Medal.

Read the eight fields one row at a time.

After reading the first row, print the following sentence:

The Summer Olympics were held in

Use print formatting approach to print the above line.

Print the same thing in the output file.

The second row has the same City and Year as the first row, so do not do anything.

Keep reading the rows till the year changes. When it changes, print the same thing as above on the computer and also in the output file.

There is data on 26 Olympics. So your output text file should have data for 26 Olympic years and their Cities, like this:

The 1896 Summer Olympics were held in Athens The 1900 Summer Olympics were held in Paris The 1904 Summer Olympics were held in St Louis The 1908 Summer Olympics were held in London The 1912 Summer Olympics were held in Stockholm The 1920 Summer Olympics were held in Antwerp The 1924 Summer Olympics were held in Paris

The 1928 Summer Olympics were held in Amsterdam The 1932 Summer Olympics were held in Los Angeles The 1936 Summer Olympics were held in Berlin

The 1948 Summer Olympics were held in London The 1952 Summer Olympics were held in Helsinki The 1956 Summer Olympics were held in Melbourne / Stockholm The 1960 Summer Olympics were held in Rome The 1964 Summer Olympics were held in Tokyo The 1968 Summer Olympics were held in Mexico The 1972 Summer Olympics were held in Munich The 1976 Summer Olympics were held in Montreal The 1980 Summer Olympics were held in Moscow The 1984 Summer Olympics were held in Los Angeles The 1988 Summer Olympics were held in Seoul The 1992 Summer Olympics were held in Barcelona The 1996 Summer Olympics were held in Atlanta The 2000 Summer Olympics were held in Sydney The 2004 Summer Olympics were held in Athens The 2008 Summer Olympics were held in Beijing

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!