Python compiling pi | SoloLearn: Learn to code for FREE!


Python compiling pi

I would like to calculate a designated amount of decimals, how can i store more digits of pi?

1/7/2019 4:01:17 AM

Imagine Existance

2 Answers

New Answer


You can use f-strings for that. For example (line 6): print(f"{pia:.16f}") # prints 16 digits after decimal point print(f"{pia:.20f}") # prints 20 digits after decimal point


I hope this will be helpful: