Word Search Puzzle Generator

Write a Word Search Puzzle Generator
In this assignment, you are asked to produce Python code to create a word search generator. A word
search is a simple children's puzzle where words hidden in a grid of letters must be found. The grid is
made up of letters in the words plus random letters elsewhere. Here is an overly simple example:
fzkwl
kcati
ohywu
There is one word hidden in the second row - cat. You can see more examples
here https://thewordsearch.com/
In the word search puzzles you are asked to generate, words can go in any of 8 directions - up/down,
forwards/backwards and diagonally. Here is an example of a word going backwards, down,
diagonally (I've put the letters of the word in bold uppercase so you can see them. In the real
puzzles, they are not highlighted like that, of course):
fzkCl
kxAti
hTywy
Your Task
You are to produce Python code that can both generate and solve word search puzzles. The puzzle
generator should accept a list of words and produce a puzzle containing those words. Note that it is
acceptable for words to intersect at points where they share a letter. The puzzle solver should take a
puzzle grid and a list of words to find and generate a list of the coordinates and directions of the
words.
Code Comments
The code you produce should have a lot of comments. Explain what the code is doing and why you
chose to do it that way. If there were alternative possible methods, describe one other possibility
and justify the choice you made. Consider whether your code is as efficient as it could be and
comment on that. For the functions you write, make sure they are fully commented so that
a help() command for them would work properly. You can also use the markdown cells in the
Jupyter notebook to elaborate on what you have done and why. You should also include some cells
Created in Master PDF Editor
in the notebook that demonstrate how you tested the code and how it responds to things like errors
in the input.

Sample Solution