summaryrefslogtreecommitdiffstats
path: root/Demo/scripts/pi.py
diff options
context:
space:
mode:
Diffstat (limited to 'Demo/scripts/pi.py')
-rwxr-xr-xDemo/scripts/pi.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Demo/scripts/pi.py b/Demo/scripts/pi.py
index 19733cb..0740cd0 100755
--- a/Demo/scripts/pi.py
+++ b/Demo/scripts/pi.py
@@ -12,7 +12,7 @@ import sys
def main():
k, a, b, a1, b1 = 2, 4, 1, 12, 4
- while 1:
+ while True:
# Next approximation
p, q, k = k*k, 2*k+1, k+1
a, b, a1, b1 = a1, b1, p*a+q*a1, p*b+q*b1
@@ -25,7 +25,6 @@ def main():
def output(d):
# Use write() to avoid spaces between the digits
- # Use str() to avoid the 'L'
sys.stdout.write(str(d))
# Flush so the output is seen immediately
sys.stdout.flush()