Delete all code after sum_pyramid as realised that the answer is at the peak of sum_pyramid.