Molly runs the comedy club, Goats Just Want to Have Jokes. For every comedian's set, she counts the number of hecklers, and the highest laugh volume, in dB. Write a program to work out some statistics for Molly.
Download the data file. Here's some of the data:
- "Performer","Hecklers","Highest laugh dB"
- "Aisha",5,113
- "Andreas","a lot",100
- "August",3,101
- "Bertha",2,118
- "Bessie",3,"Laptop broken"
- "Boyd",5,115
- "Bridgette",-2,114
When Aisha performed, she had 5 hecklers, and the loudest laugh was 113dB.
Valid records must have names. Can't be MT.
Valid heckler and volume input must be non-negative numbers.
Write a program that outputs stats like this:
- Goats Just Want to Have Jokes
- ===== ==== ==== == ==== =====
- Counts
- ------
- Valid records: 46
- Invalid records: 4
- Total records: 50
- Hecklers
- --------
- Mean: 3.67
- Std dev: 2.07
- Smallest: 0 Dawn
- Largest: 7 Johnnie
- Sound
- -----
- Mean: 101.3
- Std dev: 11.36
- Smallest: 81 Heather
- Largest: 125 Herman
- Correlation (hecklers, sound dB): -0.3
Use the statistics
module. Use at least three functions (I had more in my solution).
Upload a zip of your project folder. The usual coding standards apply.