Completed centered_average.py