Compsci 6, Fall 2011, Classwork 14

PRINT Names and NetID of students in group (min 2, max 3)
Name: __________________________   NetID: _____________

Name: __________________________   NetID: _____________

Name: __________________________   NetID: _____________

For these problems, see the file parameters.py

Problem 1:

''' example 1''' number = 5 school = 'duke' testone(number,school) print 'After call to testone, number is ', number, ', school is ', school ''' example 2 ''' num = 2 s = 'cat' testone(num,s) print 'After call to testone, num is ', num, ', s is ', s

Problem 2:

'''example 3''' nums = [4,3,8] nums.append(5) testtwo(nums) print 'After call to testtwo, nums is ', nums ''' example 4''' lista = [4,3,8] lista.append(5) testtwo(lista) print 'After call to testtwo, lista is ', lista

Problem 3:

'''example 5''' lista = (4, 5, 2) testthree(lista) print 'after call to testthree, lista is ', lista '''example 6''' lista = [(4, 5, 2),(3,2),(3,4)] testfour(lista) print 'after call to testfour, lista is ', lista '''example 7''' mylist = [(4, 5, 2),(3,2),(3,4)] testfour(mylist) print 'after call to testfour, mylist is ', mylist

Problem 4:

'''example 8''' myset = set([4, 5, 2]) testfive(myset) print 'after call to testfive, myset is ', myset '''example 9''' myset = set([(4,3), (5,2,1), (3,2)]) testsix(myset) print 'after call to testfive, myset is ', myset