lec-11-2

lec-11-2 - 11/2/2009 Announcements Program 5 half-way...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
11/2/2009 1 ECS 10 11/02 Announcements ± Program 5 – half-way submission due Thursday night (not tomorrow). ± We will not grade this submission. But it will contribute to your overall grade on the program. Kegs of beer per capita ± “per capita” is “per person” Getting population information ± Use table from Wikipedia page. ± Available in assignment. ± We’ve already found the population data in this file in two in class examples Understand and file in two in-class examples. Understand and use that code. ± Need to store it somewhere. ± Put it into the dictionary we already have. Current data structure ± Dictionary of lists ± Key = state Value = list of energy sources, in BTUs Now we get one population value for each ± Now, we get one population value for each state. ± Add that to the list. Example ± Before: energyDict[‘Oregon’] == [‘45.3’, '258.2', '384.7', '0', '332', '47.1', '14.8', '21.8', '4.2', '1108.2'] ± After: energyDict[‘Oregon’] == ['45.3', '258.2', '384.7', '0', '332', '47.1', '14.8', '21.8', '4.2', '1108.2', '3,790,060']
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/14/2010 for the course ECS 10 taught by Professor Amenta during the Spring '07 term at UC Davis.

Page1 / 3

lec-11-2 - 11/2/2009 Announcements Program 5 half-way...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online