Just watch. It calculates pi using the nilakantha series. Number 2 in my 'pi calculator' series. https://scratch.mit.edu/studios/2091092/ link to studio.