Class 32 — April 6

Functioning

Part two is ending — Soon time to show mastery — Expect to do well


Look both ways


Agenda


Update (if you did not do so last class)


Homework solutions


What to expect for the test


List patterns

result = ...

for element in the_list :

  ...

return result

n = len( the_list )

for i in range( 0, n ) :

  element = the_list[ i ]

  ...

  the_list[ i ] = element

  • Appends v to end of the_list
  • Returns the number of occurrences of v in the_list
  • Removes first occurence of v from the_list
  • Index of first occurrence of v in the_list
  • Concatenates list1 and list2 to make list3

Functions

def name ( parameters ) :


Warnings


Past Q & A




q & a session

 



Warning: fopen(/l/cs1112/public_html/defs/htm/181-trailer): Failed to open stream: No such file or directory in /l/cs1112/public_html/defs/php/read.php on line 5
Unable to open file!