This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import decimal | |
| # for reference, the first 100 digits of pi | |
| pi = decimal.Decimal('3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679') | |
| # Basic recursive factorial calculation. For large n switch to iterative. | |
| def fact(n): | |
| if n == 0: | |
| return 1 |