Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168742
Image: ubuntu2004
import math def main(): x=math.sqrt(20000.0) i=-1.0 for n in range(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.0 k=math.pi print 'Garretts value for pi \t\t', '%1.50f' % y print 'The computers value for pi \t', '%1.50f' % k main()
Garretts value for pi 3.14159265358979311599796346854418516159057617187500 The computers value for pi 3.14159265358979311599796346854418516159057617187500