lec-10-19

lec-10-19 - Midterm Grading this afternoon and tonight....

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

View Full Document Right Arrow Icon
1 ECS10 10/22 Midterm ± Grading this afternoon and tonight. ± Should appear on SmartSite soon. ± Solutions up today. If you did poorly take it as a wake up call You ± If you did poorly, take it as a wake-up call. You need to master Chapters 1-3 in the book, ASAP. Today and onwards ± We now know the basics! ± Now we look at ways to organize and compute with data. ± New data type – lis New data type list ± New kind of loop – for ± More about strings ± New assignment will be up tomorrow, due Tues Oct 27. List dayList = [‘Mon’, ‘Tues’, ‘Wds’, ‘Thur’, ‘Fri’] ± dayList dayList is a list. is a list. ± dayList dayList[0] is the string ‘Mon’, [0] dayList dayList[2] is the [2] is the string ‘ string ‘Wds Wds’ ± You can have a list of any kind of data. BP = [140,80] letters = [‘c’, ‘o’, ‘w’] Lists and indexing ± A list is a sequence of anything, numbered starting from zero. intList = [5,0,3,5,6,8,9,0,4,4,4] ± Index into a list. intList[4] # This is the integer 6 ± First thing in the list has INDEX ZERO ! Indexing into strings ± A string is like a list of single characters.
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-10-19 - Midterm Grading this afternoon and tonight....

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