{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lec-11-4 - Announcements Program 5 half-way submission due...

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

View Full Document Right Arrow Icon
11/4/2009 1 ECS 10 11/04 Announcements Program 5 – half-way submission due tomorrow. Final program due Tuesday, Nov 10. The rest of the project Get population data, store it in dictionary along with energy sources. After query, compute amount of chosen energy source per capita. Output data from dictionary to file. Upload file to Many Eyes, view map. Example Electoral college votes per capita. Find number of electoral college votes per state. Store in dictionary along with population Store in dictionary, along with population. Read in two separate loops, just to be like current project. To start over reading a file from the beginning – close and reopen it! Metaphor Dictionary is like file cabinet: you find things by name. Each list is a folder in the cabinet, with papers in a specific order. To get a paper, first get folder out of cabinet, then get paper from folder. Alternative styles popList = popDict[state] popList = popList + [votes] popDict[state] = popList vs: popDict[state] = popDict[state]+[votes]
Background image of page 1

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

View Full Document Right Arrow Icon
11/4/2009 2
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}