Class 31 — April 3

You are so controlling

Working Together – Structured Collaboration – New understanding


Look both ways


Agenda


Want to be a TA next semester


Time to redownload


Parameter passing nuances


Module of the day aid.py

Function rotate( x )

  • Updates list x by moving the last element of list x (if any) to the beginning of list x. This type of list transformation is often called a circular shift. In carrying out its action, the function does not perform an expicit return.

Function rotate_k_times( x, k )

  • Updates list x by performing k circular shifts. In carrying out its action, the function does not perform an expicit return.

Function common( x, y )

  • Returns a new list whose elements are those elements in x that are also in y. The ordering of elements in the return list should reflect their ordering in x.

To do