importmathdefmain():x=math.sqrt(20000.0)i=-1.0forninrange(50):x=math.sqrt(((100.0-math.sqrt(10000.0-(x/2.0)**2.0))**2.0+(x/2.0)**2))y=(x*2**51.0)/100.0k=math.piprint'Garretts value for pi \t\t','%1.50f'%yprint'The computers value for pi \t','%1.50f'%kmain()
Garretts value for pi 3.14159265358979311599796346854418516159057617187500
The computers value for pi 3.14159265358979311599796346854418516159057617187500