Get data from a .csv file, calculate averages of some of the columns, then write out to a .txt file.
Specifically: A biomed student asked for help on r/LearningPython. Student is in a python for data science class and was stuck. I volunteered to help her and this is what we wrote. (Well, I wrote it but she sat through a tutoring session with me to get the code.)
INSTRUCTIONS FOR PROJECT: Write a program that finds the average FBG for each year. Your program should read in the .csv file and write out the answer to a ".txt". You will need to include at least one function within your script. No external modules allowed (csv, pandas, etc).
Your output should look like this (note that these are not the actual answers): Average FBG for Year_1: 121 Average FBG for Year_2: 130 Average FBG for Year_3: 107