Exercise 7.5: Estimating pi