Lecture 6
Announcements
HW5 due today
Bonus
Add test cases for lookAndSay and inverseLookAndSay
How to use grace days
Style grading issues -> email Jason (jxgong@andrew.cmu.edu)
Everything is graded for style now
HW6 + HW7 Released Today
HW6 is due Thursday
HW7 is due Friday
No more test cases! 12 submissions total.
Lecture
[9:05] Announcements
[9:15] Left-overs from yesterday
Swapping elements
List comprehensions
Strings and Lists
[9:25] The locker problem
[9:30] 2D Lists - the basics
def make2dList(rows, cols): a=[] for row in range(rows): a += [[0]*cols] return a
[9:35] Basic aliasing + box and arrow diagram
[9:45] Deepcopy Code tracing
Limitations of Deep Copy
[9:50] Accessing a row and column, 3D lists, Non-rectangular lists
[9:55]
Attendance Check
[10:10] Example:
WordSearch