How can I print 1000 value of pi using the following code? Can I use range() function to this below method? | SoloLearn: Learn to code for FREE!

0

How can I print 1000 value of pi using the following code? Can I use range() function to this below method?

Code: from math import pi print(pi)

12/13/2017 6:59:15 PM

junayeD ●_°

3 Answers

New Answer

0

just search for it online

0

from math import pi from decimal import Decimal print(Decimal(pi)) this output the exact value of pi stored in python, if not mistaken. I believe you will get zeros for any floating point beyond this.

0

check out this tutorial: https://docs.python.org/2/tutorial/floatingpoint.html