Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Extract variables for average and Hz

  • Loading branch information...
commit d8678635383a80c6a7cfcbcccb69dd3e575dc3d8 1 parent 721a610
Andreas Pauley authored March 24, 2011

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. 4  sudoku.py
4  sudoku.py
@@ -153,10 +153,12 @@ def time_solve(grid):
153 153
 
154 154
     N = len(grids)
155 155
     if N >= 1:
  156
+        avg = sum(times)/N
  157
+        hz = N/sum(times)
156 158
         print """Solved %d of %d puzzles from %s in %d eliminations, %.6f secs
157 159
 \t(avg %.6f secs (%d Hz), max %.6f secs, min %.6f secs).""" % (
158 160
             sum(results), N, name, sum(eliminations), sum(times),
159  
-            sum(times)/N, N/sum(times), max(times), min(times))
  161
+            avg, hz, max(times), min(times))
160 162
     return valuedicts
161 163
 
162 164
 def solved(puzzle):

0 notes on commit d867863

Please sign in to comment.
Something went wrong with that request. Please try again.