Completed calculate pi assignment