Paired Programming Activity
File Problems

This particular activity asks you to create two different functions in the same file. The grader on Autolab will return a score of 0, 1, or 2 depending on how many of those two functions are working properly.

 

 

Background

A couple of years ago I was reading an article in my local newspaper [yes, I was still reading the local newspaper] that mentioned that the Waterloo school district had had it's best 4 year graduation rate in history. The number quoted seemed low to me - even for an urban school - so I got curious about the average graduation rate for schools in Iowa. That led me to find this data file for the 2017 school year.

 

Let's just look at this data for a second:

I have snipped in to only look at some of the data. But let's focus in on the row for AGWSR. The data shows that by the spring of 2017 36 of the 39 students who started as freshman in fall of 2013 had graduated in the four year period. Similarly, it shows that all 35 of the 35 students who started as freshman in fall of 2012 had graduated within that five year period.

Some schools have not reported some data. For example, Adair-Casey had reported their 5 year data but not their 4 year data. Alden had not reported any data. Every field with missing data is marked with the symbol "****"

Program Guide

For this activity you should create the following functions in the main.py file that is part of the project on Replit

Part A: Create a function called fourYearAverage() that:

 

 

Part B: Create a function called addColumns() that: