Homework 6 Due Wednesday, Nov. 4 (a week and a day) Go to http://codingbat.com/python and do the exercises. In each case, your solution should be able to produce an answer using at most two lines of code in the body. (Using a ';' to combine two lines doesn't count.) The exercise sum67 is an exception. You may use up to four lines in the body. In order to produce solutions in only two lines of code, you will probably need to use list comprehensions. There is a subdirectory /course/cs5600f15/python , which has information on getting started in Python, and in particular, on list comprehensions. You'll also want to take advantage of such Python built-in functions as: * len(), range() * max(), min(), sum(), pow(), abs() * all(), any() * set(), list() [Useful, because a set eliminates any duplicates in a list] * sorted(), reversed() * zip() * etc. As an example, consider the following function, whose body is only one line: def sum_of_squares_of_odd_numbers(max_int): return sum([i**2 for i in range(20) if i % 2 == 1]) Now, it's your turn: Python > List-1 > sum3 Python > List-1 > rotate_left3 Python > List-1 > max_end3 Python > List-1 > make_ends Python > List-1 > has23 Python > List-2 > count_events Python > List-2 > sum13 Python > List-2 > big_diff Python > List-2 > sum67 Python > List-2 > centered_average Python > List-2 > has22 Python > String-1 > extra_end Python > String-1 > without_end Python > String-2 > double_char Python > String-2 > count_code Python > String-2 > count_hi Python > String-2 > end_other Python > String-2 > cat_dog Python > String-2 > xyz_there