Class 31 — April 3
You are so controlling
Working Together – Structured Collaboration – New understanding
Look both ways
Agenda
- Consider module development
- Problem solve
- Start preparing for test 2 on Monday
Want to be a TA next semester
- Fill out for the application
Time to redownload
- url.py — adds additional web acccess
Parameter passing nuances
- Examine parameter passing nuances
Module of the day aid.py
- Examine and think about algorithms for the problems. However, do not write any code before class.
- Downloads
- Module aid.py
- Program abet.py help you test your module
aid
functions.
- Complete the implementation of three functions. None of your functions should get input or print output.
Function
rotate( x )
- Updates list
x
by moving the last element of listx
(if any) to the beginning of listx
. This type of list transformation is often called a circular shift. In carrying out its action, the function does not perform an expicitreturn
.
Function
rotate_k_times( x, k )
- Updates list
x
by performingk
circular shifts. In carrying out its action, the function does not perform an expicitreturn
.
Function
common( x, y )
- Returns a new list whose elements are those elements in
x
that are also iny
. The ordering of elements in the return list should reflect their ordering inx
.
To do
- To prepare for the test, review homework solutions
- Examine parameter passing nuances
- Assignment 17: same_difference.py
- Assignment 17: do_you_relate.py
- Assignment 18: count_down.py
- Assignment 19: common_commodities.py
- Assignment 20: take_it_away.py
- Assignment 21: hodge.py
- Assignment 22: beanery.py
- Assignment 23: magnificent.py
- Assignment 24: quad.py