Assignment
Assignment 2: Numpy
Completion requirements
Opened: Wednesday, 31 January 2024, 12:00 AM
Due: Wednesday, 7 February 2024, 11:59 PM
Below is a reference solution for assignment 1
FOr the assignment, split this into three functions:
- One function should read the data and store it in a 2-dimensional numpy array containing 0's and 1's (such that N becomes 0 and Y becomes 1).
- A second function should take such a numpy array as an argument and compute, for each of the questions, the percentage of 'N' and 'Y' answers.
- A third function should take such a numpy array and print the number of surveys with zero 'Y' answers, then the number of surveys with one 'Y' answer, with two 'Y' answers, ... , etc.
- The script should then call these functions to achieve the same result as before.
Use numpy functions where you can.
Try this out on the data file from assignment 1.
Use best practices.
- 2 February 2024, 2:58 PM