TLP - Programming Maintenance
Week 8 - Football Stadiums
This assignment is based on data collected by David Alexander during the Choose Your Own Data assignment in the FOP class.
Background
During the CYOD portion of the TLP course David Alexander found a fascinating data set with information about the football stadiums in NCAA athletics. Begin by downloading this file and looking at how it is organized.
In this week's activity you will write some code to analyze stadiums in that set based on their conference. You only NEED to do one of Task 1 or Task 2 to earn the point for this week's activity but I encourage you to attempt all parts.
Task 1
- Write a function called averageStadiumSize()
- Input
- Takes in two strings
- The first is the input file name
- The second is the name of a conference
- Takes in two strings
- Performance
- Go through the input file and look for any stadium that comes from that conference.
- Count both the capacity of the stadium and number of stadiums found.
- Output
- Return the average stadium size (rounded to the nearest whole number).
- To run this function it would look like this
Task 2
- Write a function called oldestStadium()
- Input
- Takes in two strings
- The first is the input file name
- The second is the name of a conference
- Takes in two strings
- Performance
- Go through the input file and look for any stadium that comes from that conference.
- Keep track of which is the oldest stadium in that conference.
- Output
- Return the stadium information for the oldest stadium
- To run this function it would look like this