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