Re: Getting math scores (Dictionary inside dictionary)

2015-11-24 Thread Arie van Wingerden
2015-11-24 14:41 GMT+01:00 Marko Rauhamaa : > Mark Lawrence : > > > 1) I was being facetious. > > 2) How many times do people have to be asked not to top post here > > before they stop top posting? > > 3) I only have two things to say so this is superfluous. > > Having posted only 2 times in this

Re: Getting math scores (Dictionary inside dictionary)

2015-11-24 Thread Denis McMahon
On Tue, 24 Nov 2015 03:04:09 -0800, Cai Gengyang wrote: > results = { > "gengyang": { "maths": 10, "english": 15}, > "ensheng": {"maths": 12, "english": 10}, "jordan": {"maths": 9, > "english": 13} > } > > How do you get gengyang's maths scores ? I refer to my previous answer. Open a web

Re: Getting math scores (Dictionary inside dictionary)

2015-11-24 Thread Marko Rauhamaa
Mark Lawrence : > 1) I was being facetious. > 2) How many times do people have to be asked not to top post here > before they stop top posting? > 3) I only have two things to say so this is superfluous. Mark, it may not be your objective, but you really are poisoning the atmosphere here. Marko

Re: Getting math scores (Dictionary inside dictionary)

2015-11-24 Thread Mark Lawrence
On 24/11/2015 12:23, Arie van Wingerden wrote: Hi Mark, what use would that have? Please show your code ... 2015-11-24 13:15 GMT+01:00 Mark Lawrence : On 24/11/2015 11:04, Cai Gengyang wrote: results = { "gengyang": { "maths": 10, "english": 15}, "ensheng": {"maths": 12, "english": 1

Re: Getting math scores (Dictionary inside dictionary)

2015-11-24 Thread Arie van Wingerden
Hi Mark, what use would that have? Please show your code ... 2015-11-24 13:15 GMT+01:00 Mark Lawrence : > On 24/11/2015 11:04, Cai Gengyang wrote: > >> results = { >>"gengyang": { "maths": 10, "english": 15}, >>"ensheng": {"maths": 12, "english": 10}, >>"jordan": {"maths": 9, "english

Re: Getting math scores (Dictionary inside dictionary)

2015-11-24 Thread Mark Lawrence
On 24/11/2015 11:04, Cai Gengyang wrote: results = { "gengyang": { "maths": 10, "english": 15}, "ensheng": {"maths": 12, "english": 10}, "jordan": {"maths": 9, "english": 13} } How do you get gengyang's maths scores ? Thank you ... One way is to delete the scores for ensheng and

Re: Getting math scores (Dictionary inside dictionary)

2015-11-24 Thread Cai Gengyang
Great, it works! Thanks a lot .. >>> results = { "gengyang": { "maths": 10, "english": 15}, "ensheng": {"maths": 12, "english": 10}, "jordan": {"maths": 9, "english": 13} } >>> print((results["gengyang"])["maths"]) 10 On Tue, Nov 24, 2015 at 7:10 PM, Arie van Wingerden wrote: > print((

Re: Getting math scores (Dictionary inside dictionary)

2015-11-24 Thread Arie van Wingerden
print((results["gengyang"])["maths"]) 2015-11-24 12:04 GMT+01:00 Cai Gengyang : > results = { > "gengyang": { "maths": 10, "english": 15}, > "ensheng": {"maths": 12, "english": 10}, > "jordan": {"maths": 9, "english": 13} > } > > How do you get gengyang's maths scores ? > > Thank you ...

Re: Getting math scores (Dictionary inside dictionary)

2015-11-24 Thread Steven D'Aprano
On Tue, 24 Nov 2015 10:04 pm, Cai Gengyang wrote: > results = { > "gengyang": { "maths": 10, "english": 15}, > "ensheng": {"maths": 12, "english": 10}, > "jordan": {"maths": 9, "english": 13} > } > > How do you get gengyang's maths scores ? Break the problem into two steps: - get Gengya

Getting math scores (Dictionary inside dictionary)

2015-11-24 Thread Cai Gengyang
results = { "gengyang": { "maths": 10, "english": 15}, "ensheng": {"maths": 12, "english": 10}, "jordan": {"maths": 9, "english": 13} } How do you get gengyang's maths scores ? Thank you ... -- https://mail.python.org/mailman/listinfo/python-list