Nate Brunelle Today: Lists

Slides:



Advertisements
Similar presentations
Beginning to use the language of position. Four children stand in a row. Children discuss who is at the front/first in the row? Who is behind? Who is.
Advertisements

1/8 AND, OR and NOT b How many boys? b How many girls? b How many blue? b How many red?
Conditionals-part31 Conditionals – part 3 Barb Ericson Georgia Institute of Technology Nov 2009.
Photography and CS Philip Chan. Film vs Digital Camera What is the difference?
© red ©
May 12-15, 2011 (red) May 6-11, 2011 (light red) Permanent Water (blue)
Original image: 512 pixels by 512 pixels. Probe is the size of 1 pixel. Picture is sampled at every pixel ( samples taken)
Finding Red Pixels – Part 1 Prof. Noah Snavely CS1114
Mrs. Smith’s 7th Grade Reading Blue Class Mrs. Smith’s 7th Grade Reading Blue Class Mrs. Smith’s 7th Grade Reading Blue Class.
Image Processing & Perception Sec 9-11 Web Design.
Images Data Representation. Objectives  Understand the terms bitmap & pixel  Understand how bitmap images are stored using binary in a computer system.
$100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300.
Two –Dimensional Arrays Mrs. C. Furman Java Programming November 19, 2008.
MAT 150 – Class #24 Topics: Graphing Rational Functions Asymptotes Vertical Slanted Horizontals Holes.
CS5540 HCI Sept 07 CS5540 HCI Assignment 1 Interface vs. Functionality Partner 1 Name Partner 2 Name Fall 2008.
Picture Lab. Manipulating Pictures Discussion and activities with java.awt.Color introduce students to megapixels, pixels, the RGB color model, binary.
If you say 8 color the ones in your picture purple. If you say 9 color the ones in your picture blue.
Day 8: Fruit Loops: Color. Loop Review What does the following loop print? for (int i= 0; i
Conditionals-Mod8-part41 Conditionals – part 4 Replace background Barb Ericson Georgia Institute of Technology May 2007.
FRACTIONS & SHAPES BY:. How many of these are colored red? * out of *.
= 5 = 2 = 4 = 3 How could I make 13 from these shapes? How could I make 19 from these shapes? STARTER.
MAT 150 – Class #16 Topics: Graphing Rational Functions Asymptotes Vertical Slanted Horizontals Holes.
Textures – Basic Principles Lecture 29 Fri, Nov 14, 2003.
Image Processing Objectives To understand pixel based image processing
Objective: Today we will be using bar models to create maths sentences.
Grade 11 Week 5 Percentages.
Agenda Warmup Prep for Core #1 Lesson G2 (RGB, Loops in Graphics)
Sorting and Grouping.
The Colour of Light: Additive colour theory.
Image Processing & Perception
CMSC201 Computer Science I for Majors Lecture 12 – Lists (cont)
Chapter 1.1 Factors & Multiples.
ASSIGNMENT NO.-2.
The UK Tier 1 Entrepreneur Visa and the UK Representative of Overseas Business Visa - SmartMove2UK
Images Presentation Name Course Name Unit # – Lesson #.# – Lesson Name
Lists Part 1 Taken from notes by Dr. Neil Moore & Dr. Debby Keen
Color Values All colors in computer images are a combination of red, green and blue Each component is encoded as a number means the color is.
Georgia Institute of Technology
Nate Brunelle Today: Repetition, A Trip To The Moon
Game Controller Introduction.
CS1110 cs1110.cs.Virginia.edu Nate Brunelle.
Gray Scale picture def pixBW(pixel): # given a pixel, change to BW
Unit 6 New school uniforms
Nate Brunelle Today: Repetition, Repetition
Nate Brunelle Today: Slicing, Debugging, Style
CS 106A, Lecture 18 Practice with 1D and 2D Arrays
Nate Brunelle Today: Functions again, Scope
Nate Brunelle Today: Turtles
Images Presentation Name Course Name Unit # – Lesson #.# – Lesson Name
Colors Computers build colors from Red, Green, and Blue; not Red, Blue, and Yellow. RGB = Red Green Blue Creating Colors Red + Blue = Purple No Red, No.
Nate Brunelle Today: Values and Types
Nate Brunelle Today: Lists
What Color is it?.
Answer Grid – 3 & 4 Step Equations
Nate Brunelle Today: Strings, Type Casting
Nate Brunelle Today: Values and Types
Nate Brunelle Today: Conditional Decision Statements
CS November 2010 Developing array algorithms. Reading:
Non-numeric Data Representation
When a DataSourceSelectionID is needed?
Word Work List ____________ Name____________
CSC1401 Manipulating Pictures 2
Nate Brunelle Today: Games
Exchange.
Nate Brunelle Today: Style, Collections
Nate Brunelle Today: Strings, Type Casting
Nate Brunelle Today: Functions again, Scope
Nate Brunelle Today: Web Reading
Types of Errors And Error Analysis.
CSIS110 - Introduction to Computer Science
Presentation transcript:

Nate Brunelle Today: Lists CS1110 Nate Brunelle Today: Lists

Questions?

Last Time Loops in loops

Lists in lists x=[[1, 2], [3, 4, 5], [6]] len(x) -> 3 x[1] -> [3,4,5] len(x[1]) -> 3 x[1][0] -> 3 len(x[1][0]) Error

Example of lists in lists Pictures are: A grid of pixels A grid is: A list of rows A row is: A list of pixels A pixel is: A list of 3 numbers (amounts of red, green blue) So a picture is: A list of lists of lists rows of pixels of 3 numbers

Identity, Alias Alias: another name for the same thing

New lists vs. Aliasing Creates a new list: Creates an Alias: List-builder: [x, y, z] Slicing: mylist[start:end:step] Casting: list(collection) Creates an Alias: Assignment: mylist = myotherlist Invoking a function: func(mylist)