Skip to content

Week 2 04 03

fengttt edited this page Apr 3, 2020 · 2 revisions

Plan

  • Review some of the homework problems.
  • Queens
  • Volunteer one girl to present.

Homework

  1. Continue your tictactoe. Remember, you can ask your favorite stuffed animal for help. If that does not work, ask your peer.
  2. Test your rev, zip, filter, using some interesting input. For example, empty list, list of lists, elements with interesting patterns, etc. If you run into a bug, it is time to fire up the debugger.
  3. Continue, list exercise :-)
def flatten(a):
    ''' flatten a list of lists to a list.   For example,
        flatten([1], [2, 3], [], [4, 5, 6], None, [7, 8]) should return
        [1, 2, 3, 4, 5, 6, 7, 8].
        You need to handle None and empty list []
    '''
Clone this wiki locally