Learning Scientific Programming with Python (2nd edition)

P2.7.1: Does a Scrabble word fit?

Question P2.7.1

The word game Scrabble is played on a $15 \times 15$ grid of squares referred to by a row index letter (A - O) and a column index number (1 - 15). Write a function to determine whether a word will fit in the grid, given the position of its first letter as a string (for example, 'G7') a variable indicating whether the word is placed to read across or down the grid and the word itself.