Passer au contenu principal
SciNet
  • Accueil
  • Tous les cours
  • Calendrier
  • Certificats
  • SciNet
    Site principal Documentation my.SciNet
  • CCDB
  • Plus
Fermer
Activer/désactiver la saisie de recherche
Français
English Français
Vous êtes connecté anonymement
Connexion
SciNet
Accueil Tous les cours Calendrier Certificats SciNet Replier Déplier
Site principal Documentation my.SciNet
CCDB
Tout déplier Tout replier
  1. BCH2203 - Winter 2022
  2. 1. Survey Analysis

1. Survey Analysis

Conditions d’achèvement
Ouvert le : mercredi 19 janvier 2022, 00:00
À rendre : mercredi 26 janvier 2022, 23:59

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

The results are stored in a text file called `2022-01-19_survey-results.txt`, of which each line contains one survey entry.

Each survey entry is a string of 10 characters, which can be either 'Y' or 'N'  (the first character is the answer to the first question, the second character the answer to the second, etc.)

Your task is write a python script called `survey_analysis.py` to analyze the data.

In particular:

  • Your script should read the file `2022-01-19_survey-results.txt` into a list.
  • For each of the ten questions, it should print the percentage of 'N' and 'Y' answers.
  • It should also print the number of surveys 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 January 26, 2022, at midnight.

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


  • 2022-01-19_survey-results.txt 2022-01-19_survey-results.txt
    19 janvier 2022, 10:28
Vous êtes connecté anonymement (Connexion)
Résumé de conservation de données


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.
Fourni par Moodle