SolarAnalytics Assignment SE 2020
SolarAnalytics Assignment SE 2020
1
The grid has the same number of rows and columns (X*X). Words can appear vertically or
horizontally, forwards or backwards. If a word is detected twice in the puzzle, only one result needs to
be reported (any will be fine).
Technical Requirements
The program must be compatible with Python 3.x. Your solution should only use inbuilt standard
Python libraries.
The input file contains a grid of letters representing the puzzle, a blank line and then a list a words we
are searching for, each on a new line.
Where the parameter is the name of the input file. This will create an output file: puzzle1.out The
output file contains one line for each word we are searching for in the following format:
word (start coord x, start coord y) (end coord x, end coord y)
Coordinates are relative to the top left hand corner of the grid, which is location (1, 1).
Examples
In the examples below, the words are listed in bold in the input files to highlight where they are. They
will not be formatted in the input files your program reads.
CIRN
ADOG
TCIS
KCOW
CAT
DOG
COW
2
The output file animals.out will be:
DNOMAID
PQINEEG
XXWQTDK
CDKBRAF
UWERAFX
TDAFESJ
AKJSHHE
DIAMOND
HEART
The output file suits.out will be:
CIRN
ADOG
TCIS
KDIE
CAT
DOG
DUCK
The output file lostDuck.out will be:
Evaluation Criteria
Programs will be evaluated by running them with various input files and comparing the output with the
expected output. We will also review your code. In addition to the puzzles listed above, we will test it
with other input files. Prepare your code for potential edge cases.
3
Testing is an important component of TDD and Agile methodologies. Providing unit tests utilised will
be regarded favourably.
In the follow-up interview, you will be asked to describe your program design, the steps that were
taken in implementing the solution and how the program was tested.
Submission
You will have 5 days to complete and email your solution to a [email protected]. Please
provide your test suite with associated input files if you implemented any (strongly recommended).
NB. To generate test files, the following link may be quite helpful:
http://worksheets.theteacherscorner.net/make-your-own/word-search
4