Class 29 — March 30

It still functions

Riding together — Driving and navigating — Together as one


Look both ways


Agenda


Outcomes


Module cautionary_tale_of_two_cities.py

def f( x, y ) :

  rmbr = x

  x = y

  y = rmbr

city1 = 'London'

city2 = 'Paris'

f( city1, city2 )

print( city1 )

print( city2 )


Module and_yet.py

def g( strings, s ) :

  n = len( strings )

  for i in range( 0, n ) :

  strings[ i ] = s

cities = [ 'Richmond', 'Blacksburg', 'Roanoke', 'Lynchburg', 'Norfolk' ]

g( cities, 'Cville' )

print( cities )


Statement


Problem set and set up


After class



first aid kit

 



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!