5 ms·
I think you missed the point of the "Find PI to the Nth Digit" exercise. You aren't generating pi, you're just using a pre-computed value.
by monjaro 13y ago
I think you missed the point of the "Find PI to the Nth Digit" exercise. You aren't generating pi, you're just using a pre-computed value.
- merlincorey 13y agoConsidering they are learning python, and the prompt says to generate the value of Pi, this is a great chance to introduce generators[1], the yield statement, and the itertools[2] module to someone. Of course, in my version, I'd generate the value of Tau. [1] http://stackoverflow.com/questions/102535/what-can-you-use-python-generator-functions-for http://stackoverflow.com/questions/102535/what-can-you-use-p... [2] http://docs.python.org/library/itertools.html http://docs.python.org/library/itertools.html
- karangoeluw 13y agoYou're right. I'll change the code.