TLP - Programming Maintenance
Week 11 - Fitbit Sleep Analysis
This assignment is based on data collected by Ashley Schmitt during the Choose Your Own Data assignment in the FOP class.
Background
During the CYOD portion of the TLP course Ashley Schmitt found some published sleep data from an anonymous user's fitbit.
In this week's activity you will write some code to look at classifying and counting that data:
Task
- Write a function called sleepQuality()
- Input
- Takes in two strings
- The name of the input file
- The name for an output file that will be produced by the function
- Takes in two strings
- Performance
- For each night's sleep consider the night's overall score and add a column about the quality of that night's sleep based on:
-
Score Rating < 60 Very Poor 60 to just under 75 Poor 75 to just under 80 Average 80 to just under 85 Good 85 or higher Very Good
-
- For each night's sleep consider the night's overall score and add a column about the quality of that night's sleep based on:
- Output
- No return value.
- This function produces an output file with a new column
- If the input file looked like this
- Then the output file would look like this: