Problem 3048. Scrabble Scores - 3
This problem is part of a set of problems that successively develop a more sophisticated Scrabble scoring routine. The point distribution for scoring is provided here. (Use the English points distribution.)
For this problem, you will be provided with a word and the accompanying bonus squares that the word might have covered (in a cell array of strings). Write a function to calculate the total score for the word using the multipliers. The multipliers are as follows:
- 'DL' = double letter
- 'DW' = double word
- 'TL' = triple letter
- 'TW' = triple word
- 'QL' = quadruple letter
- 'QW' = quadruple word
For those not familiar with QL and QW, those were introduced in Super Scrabble. Also, remember that the DL, TL, and QL multipliers take effect before the DW, TW, and QW multipliers. Also, multiple word multipliers can be present, having a cumulative effect (e.g., DW & TW = *6).
As an example, if the word were 'matlab' and the multiplier cell array was
{'','DW','','','','DL'}
then the score would be (3 + 1 + 1 + 1 + 1 + 2*3)*2 = 26.
Related problems:
Previous problem: 2 - Word-set scoring. Next problem: 4 - Word-set multiplier scoring.
Solution Stats
Problem Comments
Solution Comments
Show commentsGroup

The Prime Directive
- 14 Problems
- 37 Finishers
- Find the nearest prime number
- Extra safe primes
- Prime factor digits
- Twin Primes
- Twins in a Window
- The Goldbach Conjecture
- The Goldbach Conjecture, Part 2
- Goldbach's marginal conjecture - Write integer as sum of three primes
- Sophie Germain prime
- Mersenne Primes vs. All Primes
- Circular Primes (based on Project Euler, problem 35)
- Numbers spiral diagonals (Part 2)
- Pernicious Anniversary Problem
- Prime Ladders
Problem Recent Solvers37
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!