Create a dictionary that contains all the Scrabble letters as keys and their point values as values.
Ask the user for up to seven letters that will represent a Scrabble hand. Calculate the maximum possible score that could be acheived if all the letters in the hand were played.
Point Value | Letter |
---|---|
0 | Blank tile |
1 | A, E, I, L, N, O, R, S, T and U |
2 | D and G |
3 | B, C, M and P |
4 | F, H, V, W and Y |
5 | K |
8 | J and X |
10 | Q and Z |
Output:
Please enter the letters on your tiles, separated by commas: K,B,D,A,E,V,M
With the letters K, B, D, A, E, V, M the maximum possible score is 19 if all the tiles are played.
There are only a certain number of tile with each letter in the game of Scrabble. Create another dictionary with the quantities of each letter tile.
As the user is entering their tiles, if the tile their entering would exceed the number available, prevent them from entering that letter and ask for another.