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 2024
  3. Assignment 1: Analyze survey data

Assignment 1: Analyze survey data

Completion requirements
Opened: Wednesday, 17 January 2024, 12:00 AM
Due: Wednesday, 24 January 2024, 11:59 PM

You are given the results of a survey which contained 10 yes-or-no questions.

The results are stored as lines in a text file called 2024-01-17-survey-results.txt.    

Each line contains one survey submission.    

Each survey submission contain 10 characters, which can be either 'Y' or 'N', separated by commas.

Your task is to write a python script called survey-analysis.py to analyze the data in the following way:

  • For each of the ten questions, compute and print the percentage of 'Y' answers.
  • Also compute and print the number of survey submissions with zero 'Y' answers, then the number of surveys with one 'Y' answer, with two 'Y' answers, ... , and with ten 'Y' answers.

Your script should be submitted to the course site by Wednesday January 24 2024, at midnight.

Note: On the teach cluster, you can get the data file with the command

$ cp /scinet/course/bch2203/2024-01-17-survey-results.txt .



  • 2024-01-18-survey-results.txt 2024-01-18-survey-results.txt
    17 January 2024, 10:06 AM
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