TLP - Programming Maintenance
Week 9 - Colorado 14ers
This assignment is based on data collected by Gina Rogers during the Choose Your Own Data assignment in the FOP class.
Background
During the CYOD portion of the TLP course Gina Rogers found a data set with some awesome information about the 14ers (mountains whose peaks are at least 14,000 feet above sea level).
In this week's activity you will write some code to analyze those mountains.
Task
- Write a function called classifyHike()
- 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 mountain range, calculate if the trail to the peak is "For Beginners" or not
- Only Class 1 hikes are for beginners
- The classification is "Yes" or "No"
- Simultaneously, determine if the trail to the peak is "Popular" or not
- Mountains that see 10,000 or more hikers in a busy year ("Traffic.High") are popular
- The classification is "Yes" or "No"
- For each mountain range, calculate if the trail to the peak is "For Beginners" or not
- Output
- No return value.
- This function produces an output file with two new columns
- If the input file looked like this [I have hidden some of the columns to make this visible on our screen]
- Then the output file would look like this: