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 427 views
2 answers 314 views
314 views asked Apr 11, 2019 by avibootz
1 answer 237 views
1 answer 184 views
184 views asked Nov 29, 2022 by avibootz
...