Question: sudoku.python(bare,forced,marked,worked) You will design and implement a program that will read a sudoku grid whose representation is stored in a file filename.txt and create a











sudoku.python(bare,forced,marked,worked)
You will design and implement a program that will read a sudoku grid whose representation is stored in a file filename.txt and create a Sudoku object, with a number of methods: .a method preassessO that prints out to standard output whether the representation is correct and has no digit that occurs twice on the same row, on the same column or in the same box; .a method bare tex_output O that outputs some Latex code to a file, filename bare.tex, that can be compiled by pdflatex to produce a pictorial representation of the grid; a method forced tex_output O that outputs some Latex code to a file, filename_forced.tex, that can be compiled by pdflatex to produce a pictorial representation of the grid to which the forced digits technique has been applied; a method marked tex_output O that outputs some Latex code to a file, filename_marked.tex, that can be compiled by pdflatex to produce a pictorial representation of the grid to which the forced digits technique has been applied and that has been marked; a method vorked_tex output O that outputs some Latex code to a file, filename_vorked.tex, that can be compiled by pdflatex to produce a pictorial representation of the grid to which the forced digits technique has been applied, that has been marked, and to which the preemptive set technique has been applied. The input is expected to consist of 9 lines of digits, with possibly lines consisting of spaces only that will be ignored and with possibly spaces anywhere on the lines with digits. If the input is incorrect, that is, does not satisfy the conditions just spelled out, then the program should generate a SudokuError with Incorrect input as message. Here is a possible interaction: python3 Python 3.6.2 (v3.6.2:5fd33b5926, Jul 16 2017, 20: 11:06) >>from sudoku import * >> Sudoku('sudoku wrong1.txt) sudoku.SudokuError: Incorrect input >>Sudoku('sudoku_wrong 2.txt') sudoku. SudokuErr Incorrect input >>Sudoku'sudoku wrong-3.txt') sudoku.SudokuError: Incorrect input You will design and implement a program that will read a sudoku grid whose representation is stored in a file filename.txt and create a Sudoku object, with a number of methods: .a method preassessO that prints out to standard output whether the representation is correct and has no digit that occurs twice on the same row, on the same column or in the same box; .a method bare tex_output O that outputs some Latex code to a file, filename bare.tex, that can be compiled by pdflatex to produce a pictorial representation of the grid; a method forced tex_output O that outputs some Latex code to a file, filename_forced.tex, that can be compiled by pdflatex to produce a pictorial representation of the grid to which the forced digits technique has been applied; a method marked tex_output O that outputs some Latex code to a file, filename_marked.tex, that can be compiled by pdflatex to produce a pictorial representation of the grid to which the forced digits technique has been applied and that has been marked; a method vorked_tex output O that outputs some Latex code to a file, filename_vorked.tex, that can be compiled by pdflatex to produce a pictorial representation of the grid to which the forced digits technique has been applied, that has been marked, and to which the preemptive set technique has been applied. The input is expected to consist of 9 lines of digits, with possibly lines consisting of spaces only that will be ignored and with possibly spaces anywhere on the lines with digits. If the input is incorrect, that is, does not satisfy the conditions just spelled out, then the program should generate a SudokuError with Incorrect input as message. Here is a possible interaction: python3 Python 3.6.2 (v3.6.2:5fd33b5926, Jul 16 2017, 20: 11:06) >>from sudoku import * >> Sudoku('sudoku wrong1.txt) sudoku.SudokuError: Incorrect input >>Sudoku('sudoku_wrong 2.txt') sudoku. SudokuErr Incorrect input >>Sudoku'sudoku wrong-3.txt') sudoku.SudokuError: Incorrect input
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
