adding Nick D's hw

One trick is that you can combine these two lines into one:
csv.writer(f).writerows(avg_ages)

Great job overall!