How to get the fraction of PI in Python

1 Answer

0 votes
import fractions      
import math

print(fractions.Fraction(str(math.pi)))


'''
run:

3141592653589793/1000000000000000

'''

 



answered Jun 12, 2019 by avibootz

Related questions

3 answers 292 views
2 answers 208 views
208 views asked Apr 11, 2019 by avibootz
1 answer 162 views
1 answer 104 views
104 views asked Nov 29, 2022 by avibootz
...