

difficulty ( 0.4 ) # Create a solved 4 x 4 problem puzzle = Sudoku ( 4 ).

# Create a 3 x 5 sub-grid problem with 0.4 difficulty (40% of cells empty) puzzle = Sudoku ( 3, 5 ). Use solve() to get a solved puzzle, or difficulty(x) to create a problem. # Initializes a 3 x 5 puzzle puzzle = Sudoku ( 3, 5 ) # Initializes a 4 x 4 puzzle puzzle = Sudoku ( 4 ) puzzle = Sudoku ( 4, 4 ) M x n rectangular puzzles can be initialized using the Sudoku(width) or Sudoku(width, height) constructors.

Usage Basic usage from sudoku import Sudoku # Initializes a Sudoku puzzle with 3 x 3 sub-grid and # generates a puzzle with half of the cells empty puzzle = Sudoku ( 3 ). A simple Python program that generates and solves m x n Sudoku puzzles.
