+ 2

Can someone help me with my code?

Using the JSON data, create a function that returns a list of earthquake places. Print 10 earthquake places as shown below. Note: use the below link to read the data. https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/4.5_month.geojson My code: import json import urllib.request handle = urllib.request.urlopen( "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/4.5_month.geojson") data = handle.read() print(data) eData = json.loads(data) print(eData.keys()) earthquakeList = eData.get('features') print(len(earthquakeList)) print(earthquakeList[10])

9th Nov 2020, 11:15 PM
...
... - avatar
3 Respuestas
+ 3
Read the documentation and try yourself. You'll find many examples of similar tasks online. This community is always willing to help, but also only to a certain extent. You asked the same question yesterday with a different title. SL may not be there to solve your issues, perhaps to point you to starting points, but definitely not for your free lunch.
10th Nov 2020, 6:15 PM
::sк::
::sк:: - avatar
+ 1
I deleted yesterdays code because there was an error and I reuploaded it.. I did try the code and I did try to find similar tasks online, I only come to SL when I run out of options and hoping someone would see and help
10th Nov 2020, 7:13 PM
...
... - avatar
+ 1
::sк:: You are a very observant, analytical and detailed person. Excellent answer
10th Nov 2020, 9:02 PM
Juan Angel Luzardo Muslera
Juan Angel Luzardo Muslera - avatar