Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Class 9: Complex Data

David Evans
February 10, 2016

Class 9: Complex Data

cs1120: Introduction to Computing
Explorations in Language, Logic, and Machine
University of Virginia, Spring 2016

http://xplorecs.org/class9

Class 9:
Multi-Party Tallying
Complex Data
Making Pairs

David Evans

February 10, 2016
Tweet

More Decks by David Evans

Other Decks in Programming

Transcript

  1. cs1120 Spring 2016 David Evans University of Virginia Class 9:

    Complex Data Introduction to Computing: Explorations in Language, Logic, and Machines Racoons at Monticello by Mier Chen
  2. Plan Simple Data, Compound Data, Complex Data Project 2 First:

    how many people completed cs101 Lesson 3?
  3. Representing Images 844782422391070120604760 782700518086299480532702 572443234068625060387821 520729498502253384851297 974002053343519369557133 118941635126225552087008 077986937356137083006662 433530789502645864777298

    715720686250721814430948 778992115020978827167046 987336455095583237457923 067694682322600280356483 4154345459970... Some 28 Million digit number
  4. How should we represent the image? blue blue … blue

    blue blue … blue … … … ... brown … … green 2400 colors in each row 1600 rows
  5. How should we represent each pixel? blue blue … blue

    blue blue … blue … … … ... brown … … green
  6. How should we represent each pixel? blue blue … blue

    blue blue … blue … … … ... brown … … green
  7. Making a Pair pair = [first, second] list() returns an

    empty list <list>.append(<object>) appends the <object> to the end of <list>
  8. Charge • Get going on Project 2! (Due Monday) –

    You should at least be finished with Problem 3 today • Next class: – Programming with data – Making pairs without built-in lists (maybe later)