COSC 120 IN CLASS EXERCISE 2/16/2017 This must be completed during class on 2/16/2017. Open book, open computer. No collaboration! Ask Haynes or Fu for explanations. We won't help debug code this time. Write Python scripts to do the following: 1. Add up all the numbers in a list of any size. Eg: addUp( [1, 2, 3, 4] ) ---> 10 2. Add up every other number in a list of any size. Remember % operation Eg: addUpEO( [ 1, 2, 3, 4, 5] ) ---> 9 3. Given a list of tuples of the form (number, string) of any size, add up all the numbers. Eg: addUpTuples( [ (1, "h"), (2, "i"), (3, " "), (4, "!") ] ) ---> 10 4. Using the program paradigm we have been using to compute, eg, predator-prey populations, compute the prefix sums of a list of numbers of any size. Eg: prefixSums( [1, 2, 1, 3, 4, 1] ) --> [1, 3, 4, 7, 11, 12]