Scrabble is a board game for two to four players, where words must be laid on a game board using a number of random letters. Here, luck and ingenuity go hand in hand, since the letters are picked randomly and the aim is to get the highest score possible with those letters. A score is appointed to each letter of the alphabet, as you can see in the image below. The score of the word that is laid on the board, simply is the sum of the scores of the individual letters of which the word consists.

scrabble
Distribution of punts of the letters on the scrabble board.

Assignment

Add a new datatype ScrabbleWord to Python that represents the collection of words that consist only of letters from the alphabet. Both uppercase and lowercase letters are allowed, but all other characters are invalid. The objects of the datatype ScrabbleWord must behave in all respects as the built-in strings in Python, with the difference that

Furthermore, scrabble words are immutable sequences of text, that you can index and slice in the usual manner, and of which you can ask for example the length using the built-in function len.

Example

>>> word = ScrabbleWord('shrubbery')
>>> word.score()
19
>>> new = word.replace('sh', '').replace('ery', 'ish')
>>> print(new)
rubbish
>>> new.score()
14
>>> new = ScrabbleWord('flying') + ScrabbleWord('circus')
>>> print(new)
flyingcircus
>>> new.score()
23
>>> word[:5].score()
10