Re: Extracting and summing student scores from a JSON file using Python 2.7.10

2015-11-10 Thread Bernie Lazlo
On Monday, 9 November 2015 18:53:06 UTC-5, Bernie Lazlo wrote: > This should be a simple problem but I have wasted hours on it. Any help would > be appreciated. [I have taken my code back to almost the very beginning.] > > The student scores need to be summed. > =

Re: Extracting and summing student scores from a JSON file using Python 2.7.10

2015-11-10 Thread Bernie Lazlo
On Monday, 9 November 2015 22:54:05 UTC-5, wayne@gmail.com wrote: > On Monday, 9 November 2015 22:27:40 UTC-5, Denis McMahon wrote: > > On Mon, 09 Nov 2015 15:52:45 -0800, Bernie Lazlo wrote: > > > > > This should be a simple problem but I have wasted hours on it. Any help > > > would be app

Re: Extracting and summing student scores from a JSON file using Python 2.7.10

2015-11-10 Thread Pete Dowdell
On 10/11/15 08:12, Bernie Lazlo wrote: > > import json > >import urllib > >url ="http://www.wickson.net/geography_assignment.json"; > >response = urllib.urlopen(url) > >data = json.loads(response.read()) All good up to data. Now: # make a list of scores scores = [d['score'] for d in data['comme

Re: Extracting and summing student scores from a JSON file using Python 2.7.10

2015-11-09 Thread wayne . wickson
On Monday, 9 November 2015 22:27:40 UTC-5, Denis McMahon wrote: > On Mon, 09 Nov 2015 15:52:45 -0800, Bernie Lazlo wrote: > > > This should be a simple problem but I have wasted hours on it. Any help > > would be appreciated. [I have taken my code back to almost the very > > beginning.] > > =

Re: Extracting and summing student scores from a JSON file using Python 2.7.10

2015-11-09 Thread Denis McMahon
On Mon, 09 Nov 2015 15:52:45 -0800, Bernie Lazlo wrote: > This should be a simple problem but I have wasted hours on it. Any help > would be appreciated. [I have taken my code back to almost the very > beginning.] > > The student scores need to be summed. > ===

Re: Extracting and summing student scores from a JSON file using Python 2.7.10

2015-11-09 Thread Bernie Lazlo
On Monday, 9 November 2015 18:53:06 UTC-5, Bernie Lazlo wrote: > This should be a simple problem but I have wasted hours on it. Any help would > be appreciated. [I have taken my code back to almost the very beginning.] > > The student scores need to be summed. > =

Re: Extracting and summing student scores from a JSON file using Python 2.7.10

2015-11-09 Thread MRAB
On 2015-11-10 01:53, Bernie Lazlo wrote: On Monday, 9 November 2015 20:31:52 UTC-5, MRAB wrote: On 2015-11-10 01:12, Bernie Lazlo wrote: > On Monday, 9 November 2015 19:30:23 UTC-5, MRAB wrote: >> On 2015-11-09 23:52, Bernie Lazlo wrote: >> > This should be a simple problem but I have wasted h

Re: Extracting and summing student scores from a JSON file using Python 2.7.10

2015-11-09 Thread Bernie Lazlo
On Monday, 9 November 2015 20:31:52 UTC-5, MRAB wrote: > On 2015-11-10 01:12, Bernie Lazlo wrote: > > On Monday, 9 November 2015 19:30:23 UTC-5, MRAB wrote: > >> On 2015-11-09 23:52, Bernie Lazlo wrote: > >> > This should be a simple problem but I have wasted hours on it. Any help > >> > would b

Re: Extracting and summing student scores from a JSON file using Python 2.7.10

2015-11-09 Thread MRAB
On 2015-11-10 01:12, Bernie Lazlo wrote: On Monday, 9 November 2015 19:30:23 UTC-5, MRAB wrote: On 2015-11-09 23:52, Bernie Lazlo wrote: > This should be a simple problem but I have wasted hours on it. Any help would be appreciated. [I have taken my code back to almost the very beginning.] > =

Re: Extracting and summing student scores from a JSON file using Python 2.7.10

2015-11-09 Thread Bernie Lazlo
On Monday, 9 November 2015 19:30:23 UTC-5, MRAB wrote: > On 2015-11-09 23:52, Bernie Lazlo wrote: > > This should be a simple problem but I have wasted hours on it. Any help > > would be appreciated. [I have taken my code back to almost the very > > beginning.] > > > > T

Re: Extracting and summing student scores from a JSON file using Python 2.7.10

2015-11-09 Thread MRAB
On 2015-11-09 23:52, Bernie Lazlo wrote: This should be a simple problem but I have wasted hours on it. Any help would be appreciated. [I have taken my code back to almost the very beginning.] The student scores need to be summed. import json imp

Extracting and summing student scores from a JSON file using Python 2.7.10

2015-11-09 Thread Bernie Lazlo
This should be a simple problem but I have wasted hours on it. Any help would be appreciated. [I have taken my code back to almost the very beginning.] The student scores need to be summed. import json import urllib url = "http://www.wickson.net/ge