Answered step by step
Verified Expert Solution
Question
1 Approved Answer
python 3.6 read_file ( filename ) : This is the *only* function that needs to deal with reading a file. It will accept the file
python 3.6
read_file ( filename ) : This is the *only* function that needs to deal with reading a file. It will accept the file name, assume it is a CSV file as described above (with our hurricane date in the same format as the example, but with any number of rows after the header row). It will open the file, read all the described storms, and correctly create the database . It returns that database.
>>>d1 = read_file("file1.csv")
>>>d1
{1992: [('Andrew', 5, 62, 66730)], 2012:
[('Isaac', 1, 5, 24000), ('Sandy', 2, 159,
75000)]}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started