Question: Following python programs: earthquake.txt: Thanks Exercise 2B: Create a Python program that reads the data stored in the provided earthquake.txt, where each line in the

Following python programs:

Following python programs: earthquake.txt: Thanks Exercise 2B: Create a Python program that

earthquake.txt:

reads the data stored in the provided earthquake.txt, where each line in

Thanks

Exercise 2B: Create a Python program that reads the data stored in the provided earthquake.txt, where each line in the text file contains an earthquake magnitude, the date of the earthquake, the time, latitude, longitude, depth, and region, all separated by whitespace. Use the data to create lists of earthquake magnitudes and their dates, one for each region. Write these lists (in any order) to a new file called earthquakefmt.txt, formatted to match the sample output below. Exercise 2B: Sample Output: [ALASKA, [2006/10/19,2.8],[2006/10/18,2.6],[2006/10/18,2.7], [2006/10/18,2.7],[2006/10/18,2.8]] [HAWAII, [2006/10/19, 2.5], [2006/10/20, 3.1]] [PANAMA, [2006/10/18, 5.0] ] [MISSOURI, [2006/10/18, 3.4]] [INDONESIA, [2006/10/20,4.9]] [VANUATU, [2006/10/18, 6.2]] [MEXICO, [2006/10/20, 2.8], [2006/10/18, 3.3]] 2.82.55.02.63.42.73.12.72.84.96.22.83.32006/10/192006/10/192006/10/182006/10/182006/10/182006/10/182006/10/202006/10/182006/10/182006/10/202006/10/182006/10/202006/10/1802:02:1000:31:1521:15:5121:12:2520:59:2120:11:2216:40:1514:12:1914:02:1212:10:0110:45:3610:45:1710:08:4562.39120.1194.82359.93436.54061.02320.28259.80860.6861.75815.08132.16232.165149.751156.21382.592147.90489.640151.418156.611152.538151.871127.488167.243115.895115.89115.01.537.330.07.760.04.750.090.0127.0138.5VANUATU6.37.3CENTRALALASKAMAUIREGION,HAWAIISOUTHOFPANAMAGULFOFALASKASOUTHEASTERNMISSOURISOUTHERNALASKAMAUIREGION,HAWAIISOUTHERNALASKAKENAIPENINSULA,ALASKAHALMAHERA,INDONESIABAJACALIFORNIA,MEXICOBAJACALIFORNIA,MEXICO

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!