summaryrefslogtreecommitdiff
path: root/Demo/scripts/queens.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-10-11 14:23:49 +0000
committerGeorg Brandl <georg@python.org>2009-10-11 14:23:49 +0000
commit393c82324521be08f21583ecb34b761f1eb3ec3f (patch)
treeccc9a8cce076bcb531ed674e989879f59c7b5035 /Demo/scripts/queens.py
parent8ec30e835f6062dc4a465f97de6f8477e6b8b983 (diff)
downloadcpython-git-393c82324521be08f21583ecb34b761f1eb3ec3f.tar.gz
Update lpwatch script.
Diffstat (limited to 'Demo/scripts/queens.py')
-rwxr-xr-xDemo/scripts/queens.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Demo/scripts/queens.py b/Demo/scripts/queens.py
index 74756be7d8..866a7b285e 100755
--- a/Demo/scripts/queens.py
+++ b/Demo/scripts/queens.py
@@ -19,8 +19,8 @@ class Queens:
def reset(self):
n = self.n
- self.y = [None]*n # Where is the queen in column x
- self.row = [0]*n # Is row[y] safe?
+ self.y = [None] * n # Where is the queen in column x
+ self.row = [0] * n # Is row[y] safe?
self.up = [0] * (2*n-1) # Is upward diagonal[x-y] safe?
self.down = [0] * (2*n-1) # Is downward diagonal[x+y] safe?
self.nfound = 0 # Instrumentation
@@ -50,7 +50,7 @@ class Queens:
self.up[x-y] = 0
self.down[x+y] = 0
- silent = 0 # If set, count solutions only
+ silent = 0 # If true, count solutions only
def display(self):
self.nfound = self.nfound + 1