CS504 Fundamentals of Research
Assignment #4

Due: Tuesday, February 13th.

For the coding portion of this assignment the goal is to create a series of functions to perform calculations on a set of data. Each of the following should be a separate function.

1) Write a Python function that accepts a two-dimensional array as an argument and prints the two dimensional array as a table with each row of the data on it's own line. Note: this is the same probliem as from last week, you may reuse that code.

2) Write a Python function that accepts a two-dimensional array as an argument and a number of columns N. The function calculates the average of the first N elements of each row, and appends the average on to the end of the row.

3) Write a Python function that accepts a two-dimensional array as an argument and a number of columns N. The function finds the minimum of the first N elements of each row, and appends that value on to the end of the row.

4) Write a Python function that accepts a two-dimensional array as an argument and a number of columns N. The function finds the maximum of the first N elements of each row, and appends that value on to the end of the row.

5) Write a Python function that accepts a two-dimensional array as an argument and a number of columns N. The function finds the standard deviation of the first N elements of each row, and appends that value on to the end of the row.

Turn in both the code and sample output showing that each of the functions works. To do this you will need to create a two dimensional array, apply each function to the array, printing the new array each time.

6) Read for Wednesday Data Science: Challenges and Directions by Longbing Cao. Turn in: a completed copy of this review form for the article.