sudoku maker and solver |
This is a python script, which can make and solve sudoku puzzle.
If you don't know sudoku, please go to http://en.wikipedia.org/wiki/Sudoku.
This script can make/solve not only normal 3x3 sudoku but also general (rectangle) sudoku like 3x4;
Problem #1 +- -- -- +- -- -- +- -- -- +- -- -- + | A 9 | |8 |3 5 | |8 | B | 2 5 | | | 7 | 5 | B | | | | 2 | 4 |1 6 | +- -- -- +- -- -- +- -- -- +- -- -- + | 8 | | 5 |4 A | | | | 0 | | | 5 |2 | 6 3 |7 | | |0 7 4 | |5 1 | +- -- -- +- -- -- +- -- -- +- -- -- + | 5 8 | 1 A | | 7 | | 9 | | 4 | 3 B | |B 2 | | A 6 |9 | | 0 |7 3 | |6 | +- -- -- +- -- -- +- -- -- +- -- -- +
python sudoku.py
Id: sudoku.py,v 1.5 2008/12/01 02:05:46 kengo Exp $ USAGE: python sudoku.py [options] OPTIONS: -nx : number of columns (default: 3) -ny : number of rows (default: 3) -a : show also the answer (default: only the problem) -p : number of the problem (default: 0) -pp : set the final number if you want many problems at the same time
Copyright (C) 2008 Kengo Ichiki.
< kengoichiki@yahoo.com > All rights reserved. |