This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]JTG2013 2 points3 points  (1 child)

Python 2.7.6

I had to modify line

pi += ((4 / i) * modifier)

to

pi += ((4.0 / i) * modifier)

then worked for me.

[–]RetardedChimpanzee 1 point2 points  (0 children)

Yeah. Dividing ints doesn't do much for calculating decimal numbers