Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

image text in transcribed

earthquake.txt:

image text in transcribed

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

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

Professional Visual Basic 6 Databases

Authors: Charles Williams

1st Edition

1861002025, 978-1861002020

More Books

Students also viewed these Databases questions