A Sudoku puzzle commonly consists of a 9x9 matrix, and the objective is to fill the matrix with the digits 1 through 9 such that each digit appears exactly once in each row, column, and 3x3 sub-block.
The task for this part of the assignment is to write a Python application called sudokuchecker.py that will read in a partially-solved Sudoku puzzle from a text file and check to see if it contains valid digits. If the same number occurs twice in a row, column, or block, the puzzle is invalid. The text file will only contain the puzzle, with blanks represented by zeroes, and no other lines or data. Ask the user to enter the filename of the input file, and then output whether or not the puzzle is valid. You may assume that the input file given will contain a puzzle.
Two sample input files (q1-1.in and q1-2.in) are provided, however you should test your program on additional puzzles to ensure you have covered all cases.
Sample Run
[evaluate sudokuchecker.py]
Enter the input filename: q1-1.in
The puzzle is valid!
[evaluate sudokuchecker.py]
Enter the input filename: q1-2.in
The puzzle is not valid!