Write a program that reads the earthquake

Assignment Help Python Programming
Reference no: EM132081380

Need use python to write the code.

Write a program that reads the earthquake data.txt, and to process the earthquake data file and create lists of earthquake magnitudes and their dates, one for each region.

Your function should return a list of lists that looks like the following: [region, [date1, magnitude1], [date2, magnitude2], [date3, magnitude3], ... ]

Examples of 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]]

[MEXICO, [2006/10/20, 2.8], [2006/10/18, 3.3]]

earthquake data txt:

2.8 2006/10/19 02:02:10 62.391 -149.751 15.0 CENTRAL ALASKA

2.5 2006/10/19 00:31:15 20.119 -156.213 1.5 MAUI REGION, HAWAII

5.0 2006/10/18 21:15:51 4.823 -82.592 37.3 SOUTH OF PANAMA

2.6 2006/10/18 21:12:25 59.934 -147.904 30.0 GULF OF ALASKA

3.4 2006/10/18 20:59:21 36.540 -89.640 7.7 SOUTHEASTERN MISSOURI

2.7 2006/10/18 20:11:22 61.023 -151.418 60.0 SOUTHERN ALASKA

3.1 2006/10/20 16:40:15 20.282 -156.611 4.7 MAUI REGION, HAWAII

2.7 2006/10/18 14:12:19 59.808 -152.538 50.0 SOUTHERN ALASKA

2.8 2006/10/18 14:02:12 60.686 -151.871 90.0 KENAI PENINSULA, ALASKA

4.9 2006/10/20 12:10:01 1.758 127.488 127.0 HALMAHERA, INDONESIA

6.2 2006/10/18 10:45:36 -15.081 167.243 138.5 VANUATU

2.8 2006/10/20 10:45:17 32.162 -115.895 6.3 BAJA CALIFORNIA, MEXICO

3.3 2006/10/18 10:08:45 32.165 -115.891 7.3 BAJA CALIFORNIA, MEXICO

Reference no: EM132081380

Questions Cloud

Plot the production possibility curve for joan : What would be happening if Joan's combination of her grades and hours of work per week Explain in your own words, using demand and supply curves, the concepts
Mixes and sells organic pesticides : Organic Garden, Inc. mixes and sells organic pesticides. What does Garden have to do in order to sell their products? Choose all that apply.
If the us congress enacts new environmental legislation : If the US Congress enacts new environmental legislation, upon whom will they rely on to implement the legislation?
Pro argument for legalization : Using the perspective of ethical egoism, what are the issues with legalizing marijuana, using a pro argument for legalization?
Write a program that reads the earthquake : Write a program that reads the earthquake data.txt, and to process the earthquake data file and create lists of earthquake magnitudes and their dates.
Do gene and gob have a valid contract : Do Gene and Gob have a valid contract? Why or why not? Is there a way for either party to get out of the contract? Why or why not?
Create two functions that computes the given for each state : The data represents the Sales Tax information for the 50-city States in US. 'Create two functions that computes the following for each state.
Using the perspective of emotivism : Using the perspective of emotivism, what are the issues with legalizing marijuana?
How has predatory americans with disabilities act : How has predatory Americans with Disabilities Act (ADA) lawsuits been bad for the lodging industry?

Reviews

Write a Review

 

Python Programming Questions & Answers

  Write a python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd