Modify finding_average and rolling_six functions to use different loops