You are required to solve and write Python code for the task below; and also produce a written report to describe and analyse the problem you are solving, explain your solution to the problem, and detail how you have tested and evaluated your solution.
You must use Python version 3 for this assignment; submissions using any other programming language or Python version will not be marked and could result in a mark of zero for this assignment.
Write a Python program to validate a given Latin Square puzzle board.
Background:
Examples of some valid Latin Square puzzle boards: see image.
The Latin Square puzzle boards will be supplied in the form of a text file, for example: see image.
The program should prompt the user for the filename of a text file to open some Python error handling should be used in case the user enters the name of a file that does not exist.
The program should read the contents of the given text file and store this in a suitable Python data structure.
Appropriate validation should be in place to ensure the supplied file contains a complete n x n square grid of characters, and where there are exactly n different characters used in the grid.
Assuming an n x n square grid of n different characters is successfully loaded into the chosen data structure, further checks should then be performed to ensure that no character appears more than once in each row, and in each column of the grid.
If any errors are detected in the Latin Square puzzle board then details of these errors should be given to the user.
If the Latin Square puzzle board passes all the validation checks, then it should be written into a new text file using the same format as the original input file (see the example text files above) the name for this new text file should be the original filename entered by the user prefixed with CHECKED_.
To make your code more efficient and neat you should write your segments of your code in functions where appropriate for particular tasks.
Produce a written report in a Microsoft Word document (or similar) to describe your program.
The report must contain the following sections:
Please note, any code pasted into the report should use the Courier New (or a similar fixedwidth) font to distinguish it from any other text; screenshots must not be used for source code.
Maximum length for the report: ~1800 words (excluding contents page, code segments, bibliography, and appendix).