Below this is the python code.
import math counter=1 pi_squared=0 pi_pi=0 while True: pi_squared=pi_squared+(6/(counter*counter)) counter=counter+1 pi_pi=math.sqrt(pi_squared) print(pi_pi)