Skip to main content
SciNet
  • Home
  • All Courses
  • Calendar
  • Certificates
  • SciNet
    Main Site Documentation my.SciNet
  • CCDB
  • More
Close
Toggle search input
English
English Français
You are currently using guest access
Log in
SciNet
Home All Courses Calendar Certificates SciNet Collapse Expand
Main Site Documentation my.SciNet
CCDB
Expand all Collapse all
  1. Dashboard
  2. BCH2203 - Winter 2022
  3. 2. Survey Analysis Improved

2. Survey Analysis Improved

Completion requirements
Opened: Wednesday, 2 February 2022, 1:30 PM
Due: Wednesday, 9 February 2022, 11:59 PM

Start from the reference solution (below) for assignment 1.

Split this into three functions:

  1.  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).
  2. 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.
  3. 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 new script should include these functions and then call these functions to achieve the same result as in assignment 1.

Use numpy functions where you can.  

Try this out on the data file from assignment 1. 

Use best practices.

The late policy is stated in the syllabus.

  • survey_analysis.py survey_analysis.py
    2 February 2022, 1:36 PM
Contact site support
You are currently using guest access (Log in)
Data retention summary


All content on this website is made available under the Creative Commons Attribution 4.0 International licence, with the exception of all videos which are released under the Creative Commons Attribution-NoDerivatives 4.0 International licence.
Powered by Moodle