[Question]
  [
### Challenge:
Take a string of upper or lower case letters as input (optional), and calculate the score that string would get in a game of [Scrabble](https://en.wikipedia.org/wiki/Scrabble) in English.
### Rules:
The score of each letter is as follows (use this even if there are other versions of the game):
```
1 point: E, A, I, O, N, R, T, L, S, U
2 points: D, G
3 points: B, C, M, P
4 points: F, H, V, W, Y
5 points: K
8 points: J, X
10 points: Q, Z
```
The score of a string is simply the sum of the scores of each of the letters used. You may assume that you have plenty of tiles available, so long words, and words with many of the same letters are valid input.
### Test cases:
```
ABC       ->    7
PPCG      ->   11
STEWIE    ->    9
UGPYKXQ   ->   33
FIZZBUZZ  ->   49
ABCDEFGHIJKLMNOPQRSTUVWXYZ  -> 87
```
The shortest answer in each language wins! The input and output formats are flexible, so you may take the input as an array of characters (upper or lower case) if you want.
  
[Answer]
# [sed 4.2.2](https://www.gnu.org/software/sed/), 81
```
s/[QZ]/JD/g
s/[JX]/KB/g
s/K/FE/g
s/[FHVWY]/BE/g
s/[BCMP]/DE/g
s/[DG]/EE/g
s/./1/g
```
Output is in [unary](https://codegolf.meta.stackexchange.com/a/5349/11259).
Reduces each letter to a combination of lower-scoring letters until all letters are 1-scorers. Then replaces those with `1`s to give a unary count.
[Try it online!](https://tio.run/##LcpBDsIgEIXh/RzGiUcQGChgFWwpMIadpgfo/YON7e77X972/fS@4TtyQ6dwhd2uNPTib4@ajlEPS64NxZlCjqGhOkuZhnT4gldce78JCSFIA9NM2RIkE6ovEbRlFokZ9oMibQbr/H18PEN8TXNacqn8Aw "sed 4.2.2 ‚Äì Try It Online")
[Answer]
# [Octave](https://www.gnu.org/software/octave/), 50 bytes
```
@(t)'		

		


'/3*sum(65:90==t')'
```
[Try it online!](https://tio.run/##y08uSSxL/Z9mq6en999Bo0RTnZmTk42Zh42HWYKfmZOZmVOOGQh4eCR45NT1jbWKS3M1zEytLA1sbUvUNdX/p2moOzo5q2sqqCpAgK4diDTnAkoEBDi7I2TAEoaGIIngENdwT1eYFESHJUgi1D0g0jsiECoDljA2Bkm4eUZFOYVGRUFkwBImYB1Ay11c3dw9PL28fXz9/AMCg4JDQsPCIyIRSi3Muf4DAA "Octave ‚Äì Try It Online")
Challenge accepted. Explanation:
```
@(t)             % Define anonymous function taking a single argument t.
    ' ... '/3    % Row vector with letter scores. Corresponds to char([1 3 3 2 ...]*3). 
                 % The factor 3 was necessary to avoid a newline.
*                % Dot product (yes, * is dot product, .* is not. Go figure). Equivalent to sum of element-wise products.
     65:90       % Alphabet
          ==t'   % Broadcast equality with input string.
 sum(         )  % Sum this matrix. Gives the count of each letter in the alphabet
               ' % Transpose into column vector for dot product
```
[Answer]
# [Haskell](https://www.haskell.org/), ~~86~~ 84 bytes
```
f s=length s+sum[n|x<-s,(n,y)<-zip(9:7:[1..])$words"QZ JX DG BCMP FHVWY K",x`elem`y]
```
[Try it online!](https://tio.run/##BcHLCoJAFAbgV/mRFkoqtIpEXWRkFIFtuiiCQuOFxqN4JtLo3afva0p@CSm1rsCBFFSrBrzkd5fRb/Idtk2yZ8t3vu1gbry1l61cN7cWn358snFJcbxjF2MbnRPsD9fbAyfDngohRVfMue7KlhCgFirqSQlSjDAMMIwtKbiodJJE8R8 "Haskell ‚Äì Try It Online")
### Explanation
Most letters give a score of 1 and thus we don't need to keep track of these, instead we just decrement each score (saves 1 byte on `10` as well) and then add the length of the string to the resulting score.
Thanks [@nimi](https://codegolf.stackexchange.com/users/34531/nimi?tab=profile) for -2 bytes (rearanging the words and using `[1..]` instead of `[4,3..]`)!
[Answer]
# [Beatnik](https://esolangs.org/wiki/Beatnik), 733 bytes
Since it really had to be done, here it is. It was a really nasty to debug and provided a few challenges.
Input must be uppercase letters only.
Output is unary (hope that is OK?)
```
J K ZZZZZZK Z ZD ZB ZZZZZZZZZZZZZZZZZA K A Z ZD ZB ZZZZZZZZZZZZZZZKF K A Z ZD ZB ZZZZZZZZZZZZZZZB K A Z ZD ZB ZZZZZZZZZZZZZZZ K A Z ZD ZB ZZZZZZZZZZZZZZKD K A Z ZD ZB ZZZZZZZZZZZZZD K A Z ZD ZB ZZZZZZZZZZZZZD K A Z ZD ZB ZZZZZZZZZZZZ K A Z ZD ZB ZZZZZZZZZZZZB K A Z ZD ZB ZZZZZZZZZKA K A Z ZD ZB ZZZZZZZZZKF K A Z ZD ZB ZZZZZZZZZZK K A Z ZD ZB ZZZZZZZZZB K A Z ZD ZB ZZZZZZZZZB K A Z ZD ZB ZZZZZZZZKD K A Z ZD ZB ZZZZZZZK K A Z ZD ZB ZZZZKB K A Z ZD ZB ZZZZZZKF K A Z ZD ZB ZZZZZZB K A Z ZD ZB ZZZZZFB K A Z ZD ZB ZZZZZA K A Z ZD ZB ZZZAK K A Z ZD ZB ZZZ K A Z ZD ZB ZD K A Z ZD ZB ZKB K ZZZZKF KF K ZZZZKF KF K ZZZZKF KF K ZZZZKF KF K ZZZZKF KF K ZZZZKF KF K ZZZZKF KF K ZZZZKF KF K ZZZZKF KF K ZZZZKF KF K A ZKA ZZZZZZZZZZZZZZZZZZY
```
[Try it online!](https://tio.run/##S0pNLMnLzP7/30vBWyEKDIC0QpSLQpQTlI8EHIGKHHFJe7vhk3XCJ4lHztsFtyRZUjglcLjQG4encXrXG7u4EynC2H2NabI3Nu1YXYZFoRsWMQzPOmJYispHcyjYQTBHuNGZDXQHMLYwUm1U5P//jk7OLq5u7h6eXt4@vn7@AYFBwSGhYeERUZEA "Beatnik ‚Äì Try It Online")
General process is:
* get character from input
* subtract 65
* check if result is 0
	+ if 0 jump specified amount of words.
	+ otherwise subtract 1 and repeat check.
* the jump targets are push print operations followed be a loop back to beginning of program.
Ends with an error.
A more complete explanation:
```
J K ZZZZZZK Z ZD               # Get input and subtract 65
ZB ZZZZZZZZZZZZZZZZZA K A Z ZD # Character A - if 0 jump to print, otherwise subtract 1
ZB ZZZZZZZZZZZZZZZKF K A Z ZD  # Character B - if 0 jump to print, otherwise subtract 1
ZB ZZZZZZZZZZZZZZZB K A Z ZD   # Character C - if 0 jump to print, otherwise subtract 1
ZB ZZZZZZZZZZZZZZZ K A Z ZD    # Character D - if 0 jump to print, otherwise subtract 1
ZB ZZZZZZZZZZZZZZKD K A Z ZD   # Character E - if 0 jump to print, otherwise subtract 1
ZB ZZZZZZZZZZZZZD K A Z ZD     # Character F - if 0 jump to print, otherwise subtract 1
ZB ZZZZZZZZZZZZZD K A Z ZD     # Character G - if 0 jump to print, otherwise subtract 1
ZB ZZZZZZZZZZZZ K A Z ZD       # Character H - if 0 jump to print, otherwise subtract 1
ZB ZZZZZZZZZZZZB K A Z ZD      # Character I - if 0 jump to print, otherwise subtract 1
ZB ZZZZZZZZZKA K A Z ZD        # Character J - if 0 jump to print, otherwise subtract 1
ZB ZZZZZZZZZKF K A Z ZD        # Character K - if 0 jump to print, otherwise subtract 1
ZB ZZZZZZZZZZK K A Z ZD        # Character L - if 0 jump to print, otherwise subtract 1
ZB ZZZZZZZZZB K A Z ZD         # Character M - if 0 jump to print, otherwise subtract 1
ZB ZZZZZZZZZB K A Z ZD         # Character N - if 0 jump to print, otherwise subtract 1
ZB ZZZZZZZZKD K A Z ZD         # Character O - if 0 jump to print, otherwise subtract 1
ZB ZZZZZZZK K A Z ZD           # Character P - if 0 jump to print, otherwise subtract 1
ZB ZZZZKB K A Z ZD             # Character Q - if 0 jump to print, otherwise subtract 1
ZB ZZZZZZKF K A Z ZD           # Character R - if 0 jump to print, otherwise subtract 1
ZB ZZZZZZB K A Z ZD            # Character S - if 0 jump to print, otherwise subtract 1
ZB ZZZZZFB K A Z ZD            # Character T - if 0 jump to print, otherwise subtract 1
ZB ZZZZZA K A Z ZD             # Character U - if 0 jump to print, otherwise subtract 1
ZB ZZZAK K A Z ZD              # Character V - if 0 jump to print, otherwise subtract 1
ZB ZZZ K A Z ZD                # Character W - if 0 jump to print, otherwise subtract 1
ZB ZD K A Z ZD                 # Character X - if 0 jump to print, otherwise subtract 1
ZB ZKB                         # Character Y - if 0 jump to print, otherwise subtract 1
K ZZZZKF KF                    # Jump Point for print 1111111111
K ZZZZKF KF                    #
K ZZZZKF KF                    # Jump Point for print 11111111
K ZZZZKF KF                    #
K ZZZZKF KF                    #
K ZZZZKF KF                    # Jump Point for print 11111
K ZZZZKF KF                    # Jump Point for print 1111
K ZZZZKF KF                    # Jump Point for print 111
K ZZZZKF KF                    # Jump Point for print 11
K ZZZZKF KF                    # Jump Point for print 1
K A ZKA ZZZZZZZZZZZZZZZZZZAAAA # Jump back to start
```
[Answer]
# Pyth, 40 bytes
```
sm+2x.e}dbc." z√ò√ç j√ô¬π>;%OG5¬ß"\ 1
```
[Try it here](http://pyth.herokuapp.com/?code=sm%2B2x.e%7Ddbc.%22%20z%11%C3%98%03%C3%8D%09j%C3%99%C2%8C%C2%99%C2%B9%3E%C2%9A%3B%C2%8C%25%01OG5%C2%83%C2%A7%22%5C%201&input=%22fizzbuzz%22&debug=0)
### Explanation
```
sm+2x.e}dbc." z√ò√ç j√ô¬π>;%OG5¬ß"\ 1
 m                              Q  For each character in the (implicit) input...
    x.e  b                     1   ... find the first index in...
          c." z√ò√ç j√ô¬π>;%OG5¬ß"\     ['dg','bcmp','fhvwy','k','','','jx','','qz']
       }d                          ... containing the character...
  +2                               ... 2-indexed.
s                                  Take the sum.
```
[Answer]
# [Brain-Flak](https://github.com/DJMcMayhem/Brain-Flak), ~~210, 204, 198, 184~~, 170 bytes
```
({<([{}]<>(({}{}))(([][][][][])<((([]())<([][])>))((((()))))>)[](((()()())<((()))>)((())()()()()))((())()()())((()())()())[]((((())())()))(())){({}<{}>())}>{}{}<{{}}><>})
```
[Try it online!](https://tio.run/##TY4xCsRACEWv8y1yA7HYIrAHSDMhxWwRWHZJsa14dledBOIH5z/9A75@/X1M@7d/3KGMVW1jAdTUiIB1u0SMRFCYYsl9FGUJxSohVdEa1otTdEca4eHH36IzF03jCFaT8CZ5D6uaCYuR@/xs7bG05lP/Aw "Brain-Flak ‚Äì Try It Online")
Thanks to @JoKing for saving 14 bytes!
Readable version:
```
({              # For each character
                # Push array of letter scores
                # Also adjust character to 1-indexing
        <([{}]<>
        (({}{}))    # Push 2 0s
        (([][][][][])   # 10
        <((([]())   # 4
        <([][])>    # 8
        ))      # 4,4
        ((((()))))> # 1,1,1,1
        )       # 10
        []      # Add 12 to difference
        (((()()())  # 3
        <((()))>    # 1,1
        )       # 3
        ((())()()()())) # 1, 5
        ((())()()())    # 1, 4
        ((()())()())    # 2, 4
        []      # Add 22 to difference
        ((((())())()))  # 1,2,3
        (())        # 1
        )   # Push 65-char
        {({}<{}>())} # Index character into score array
        >
        {}{}         # Add score to running total
        <{{}}><>     # Clear the stack
})               # Implicit print of total score
```
[Answer]
# [Python 2](https://docs.python.org/2/), 78 bytes
```
lambda x:sum(map(('ABCEIKLMNOPRSTU'+'BCDGMPQZ'*2+'FHJJKQQVWXXYZZ'*4).count,x))
```
[Try it online!](https://tio.run/##HYzLCoJAGEb3PcXs/pmaWkgroSBNTc0aU/NCG7tIQl7QEezpp7HVd/jgnPbL302tiGJzE5@8uj9zNKr9UOEqbzGGnaYbtnv0Tmd2CcIIFqDpe8tjfgZzZQHmwXFc37/GSZJm8lqT1aMZak5HQkTRdIi/eo7KGk0hoMCYbskJQiO2DQmRxVI38SWZdpZpkWyoM9R2Zc3/KoXlFmiBJybiBw "Python 2 ‚Äì Try It Online")
### Shorter version, port of [DanielIndie's answer](https://codegolf.stackexchange.com/a/162608/47120), ~~71~~ 70 bytes
-1 byte thanks to Sunny Patel
```
lambda x:sum(int('02210313074020029000033739'[ord(c)-65])+1for c in x)
```
[Try it online!](https://tio.run/##K6gsycjPM/qfZhvzPycxNyklUaHCqrg0VyMzr0RD3cDIyNDA2NDYwNzEwMjAwMjSAAiMjc2NLdWj84tSNJI1dc1MYzW1DdPyixSSFTLzFCo0/4PYJanFJSCuuqOTs7qOekCAszuQCg5xDfd0BTJC3QMivSMCgSw3z6gop9CoKHUrLoWCIqClYK066rp26jppGiC25n8A "Python 2 ‚Äì Try It Online")
[Answer]
# [JavaScript (Node.js)](https://nodejs.org), 71 66 63 62 bytes
* @Arnauld awesome as always reducing 7 bytes
* thanks to l4m2 for rducing by 1 byte
```
s=>Buffer(s).map(x=>s="02210313074020029000033739"[x-65]-~s)|s
```
[Try it online!](https://tio.run/##Zc5NE0JAAMbxex/DyR6YZZUctpkISS@EvDQdjGhqhLHVODR9ddExz/U3/5nnFr9iktTX6sEU5TltM9wSPJOfWZbWNAHsPa7oBs8IpiDPcxBxCIoC5CHkJdgNIRFJ1LFhJuMT8yHgTdqkLEiZp2xeXuiMpuayQgGMRTD6A8tS9F44bkCOq/qG2qM0ME@3QjOwe0RooJoRRbIXRT0Lw7g7s1A1fWmszPVmu7PsveN6Bz8If8FUBO0X "JavaScript (Node.js) ‚Äì Try It Online")
[Answer]
# Java 8, ~~75~~ ~~71~~ 70 bytes
```
s->s.chars().map(c->"\n\n".charAt(c-65)).sum()
```
-1 byte by changing `"02210313074020029000033739".charAt(c-65)-47` to unprintables (and two `\n`) so the `-47` can be removed. Inspired by [@Sanchises' Octave answer](https://codegolf.stackexchange.com/a/162676/52210).
[Try it online.](https://tio.run/##dVFha8IwEKW2A9mvCP2UIJbauonKBHXqnNPVVad27kNW61Zn09JEQcTf3sVYBmXsSD7k3bt373IbvMfFMPLIZvWduFtMKRhinxyvAfAJ8@I1dj0wOj8FAFxos9gnn4CiOgdP/PJDGWa@C0aAgDuQ0GKDau4XjilEWoAj6BYbqiTLOUnJKVL@SpIlSV4SiYei5JUlUQW7yTjx9gYhje4CiJL6RTvafWy5dtpiH/orEHCHqY@3d4wu7tZhDM8ywK2pumGUdLNk6pWybui6UdV5mGbFrKoaC9vnZnGMDxAhUQqAfaDMC7Rwx7SIyzIopBA3VK4gMelfzpZAnhEp5lEG1WarrabcC2BZ7V4WsSedWb@TxaY9azGYj7Ngt@84ranjZFHe4b7T7T30HwdPw9GzNX6xJ9PX2XyR8rLrEH8lCn93dvxvElpQa0AtEM2FFKVap@QH)
```
s->          // Method with String parameter and integer return-type
  s.chars()  //  Loop over the characters as IntStream
   .map(c->"\n\n".charAt(c-65))
             //   Convert the character to its value
   .sum()    //   And sum it all together
```
[Answer]
# [Octave](https://www.gnu.org/software/octave/) / MATLAB, 85 bytes
```
@(x)sum([1:4 7 9]*any(reshape(char(strsplit('DG BCMP FHVWY K JX QZ')),6,1,5)==x,3)+1)
```
[Try it online!](https://tio.run/##JctbC4IwAIbh@37F7raVCNKJAqE8TTNr5nnRxRDFoIM4C/v1Jnj3vHx877zl36IvVVmW@x3qsPg80VXZLsAabG5T/vqhphAVrwuUV7xBom1E/bi3CBoEaLpHgWXHSQZccEiBzyDG0kpSpCVW1U6a45mC@xLBvaZDPBlAqU5GBaGZOOboiNDMTf0xLIcxLWJsrOFpmBaxnYN79E5n6l@CMIqTNBv2/g8 "Octave ‚Äì Try It Online")
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 19 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
O·ªã‚Äú√Ü·∫†·∏Éb·πÇ∆¨…†F#·πÅ¬≤‚Äô·∏É‚Åµ¬§S
```
A monadic link accepting a list of upper-case characters which returns an integer
**[Try it online!](https://tio.run/##AToAxf9qZWxsef//T@G7i@KAnMOG4bqg4biDYuG5gsasyaBGI@G5gcKy4oCZ4biD4oG1wqRT////U1RFV0lF "Jelly ‚Äì Try It Online")** Or see the [test-suite](https://tio.run/##AYEAfv9qZWxsef//T@G7i@KAnMOG4bqg4biDYuG5gsasyaBGI@G5gcKy4oCZ4biD4oG1wqRT/@G7tMW8w4fFkuG5mCTigqwkR///QUJDClBQQ0cKU1RFV0lFClVHUFlLWFEKRklaWkJVWloKQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVo "Jelly ‚Äì Try It Online").
### How?
```
O·ªã‚Äú√Ü·∫†·∏Éb·πÇ∆¨…†F#·πÅ¬≤‚Äô·∏É‚Åµ¬§S - Link: list of characters
O                   - ordinals ('A'->65, B->66...)
                 ¬§  - nilad followed by link(s) as a nilad:
  ‚Äú√Ü·∫†·∏Éb·πÇ∆¨…†F#·πÅ¬≤‚Äô     -   literal 14011114485013321424185131
                ‚Åµ   -   literal 10
               ·∏É    -   bijective-base = [1,3,10,1,1,1,1,4,4,8,4,10,1,3,3,2,1,4,2,4,1,8,5,1,3,1]
 ·ªã                  - index into (1-based & modular) (vectorises)
                    -  i.e. mapping from: O P  Q R S T U V W X Y  Z A B C D E F G H I J K L M N)
                  S - sum
```
[Answer]
# [R](https://www.r-project.org/), ~~90~~ 63 bytes
```
function(W,u=utf8ToInt)sum(u('

')[u(W)-64])
```
[Try it online!](https://tio.run/##K/qfpmCj@z@tNC@5JDM/TyNcp9S2tCTNIiTfM69Es7g0V6NUQ52RmZmJkYWJhZGDlZGZkZGZixEIWFg4WLjUNaNLNcI1dc1MYjX/p2koOTo5K2lyARlunlFRTqFRUUDefwA "R ‚Äì Try It Online")
Takes input as an uppercase string. R handles unprintables and multiline strings without issues, so that's nice. Now we're almost twice the external package!
And because CRAN has so many random goodies:
# [R](https://www.r-project.org/) + [ScrabbleScore](https://cran.r-project.org/web/packages/ScrabbleScore/ScrabbleScore.pdf) 31 bytes
```
ScrabbleScore::sws(scan(,""),F)
```
[Try it online!](https://tio.run/##K/r/Pzi5KDEpKSc1ODm/KNXKqri8WKM4OTFPQ0dJSVPHTfP/fwA "R ‚Äì Try It Online")
Sadly, `sws` checks for validity by default.
[Answer]
# [Emojicode](http://www.emojicode.org/), 358 bytes
```
üêñüî•‚û°Ô∏èüî°üçáüçÆs 0üîÇlüç°üêïüçáüçÆs‚ûïsüç∫üêΩüçØüî§aüî§1üî§eüî§1üî§iüî§1üî§lüî§1üî§nüî§1üî§oüî§1üî§rüî§1üî§süî§1üî§tüî§1üî§uüî§1üî§düî§2üî§güî§2üî§büî§3üî§cüî§3üî§müî§3üî§püî§3üî§füî§4üî§hüî§4üî§vüî§4üî§wüî§4üî§yüî§4üî§küî§5üî§jüî§8üî§xüî§8üî§qüî§10üî§züî§10üçÜüî°lüçâüçéüî°s 10üçâ
```
[Try it online!](https://tio.run/##ZZDNTsJAFIX3PEUfwd/E17HttLS0tDAthVmpCw0xCAsxrpiQ4Fa3xsSX4QWcN8B7ajiJ6WK@fvfMpLk5Ki/SJChCdXB29ejs89bZxQOGFxne9pvtz@fyGMt5196JjHeZuGSrNfP9Zq1FviT8lu@HvNpdA6eAoiW0jDakFbQxTdMqWk0LgTMgpvnAORDQclpJi4ALoE@b0BrajDYALoEUuAKmtFG7FQramaMu7lEf@prLecKgvfZifgB6zi5v0WLPc/b1Bq231fnt6v/Dsgzibqor1SSqm0eJMX5tTPdGfh6qKO4n6SDLh0U5GuuqnjTT2d/bdrdf "Emojicode ‚Äì Try It Online")
## Explanation:
I changed the variable names from single letters to more meaningful words, and expanded some parts of my code to hopefully make it more readable for people unfamiliar with the language. You can test the expanded program [here](https://tio.run/##ZZHNToNAEMfvfQoeofUj8XX4WOhS6FJYoOWkHmyMwfbQGk8lJOpRr8bEl@kLyBvQnVlwNFwmv/3/dz4yw0Lhc1s4rG2bavvQVLu6qcr1yFCvJ/V6PR7qn8/Nrz4ylFO@ZWaQskTRhxKUsnsxIUwQGSEnDAjnhIIwJkwIJWFK6EA4Q/QQ@zEsCOeINmFIGBG6EC4Qp4QZYU64IpxBuET0IVwhLhH7MRY46hi50Kw3d9dt8D2xRcyMcb9QLllsSqF2UKpFb/ddoduASeUYf@w1WFTieNjrUkr5Upnf@jSQXOtk3eG@6/QIhs6YQHe0tN9Um5v@@M/XcHw8rIWL/C9Gke0N1USynLOh7vKisNKiGDqquMNcb8r9WRDORbSIE5lm@XKl/8JcbXsC).
```
üêãüî°üçá      üë¥ define a class that takes a string
 üêñüî•‚û°Ô∏èüî°üçá    üë¥ define a method that returns a string
  üç¶valuesüçØ    üë¥ create int dictionary
   üî§aüî§1 üî§eüî§1 üî§iüî§1 üî§lüî§1 üî§nüî§1 üî§oüî§1 üî§rüî§1 üî§süî§1 üî§tüî§1 üî§uüî§1 üî§düî§2 üî§güî§2
   üî§büî§3 üî§cüî§3 üî§müî§3 üî§püî§3 üî§füî§4 üî§hüî§4 üî§vüî§4 üî§wüî§4 üî§yüî§4 üî§küî§5 üî§jüî§8 üî§xüî§8
   üî§qüî§10 üî§züî§10
  üçÜ        üë¥ ^ dictionary contains letters(keys) and their numerical values
  üçÆscore 0                         üë¥ declare 'score' variable and set to 0
   üç¶iteratorüç°üêï                     üë¥ transform input string to iterator
    üîÇletter iteratorüçá                üë¥ iterate over each byte in input string
     üçÆscore‚ûïscore üç∫üêΩvalues üî°letter   üë¥ add value of each letter to score
   üçâ
  üçéüî°score 10    üë¥ return the score as a string
 üçâ
üçâ
üèÅüçá          üë¥ begin the program here
 üòÄüî•üî§abcüî§    üë¥ call scoring method and print the score
 üòÄüî•üî§ppcgüî§    üë¥ repeat with other test cases
 üòÄüî•üî§stewieüî§
 üòÄüî•üî§fizzbuzzüî§
 üòÄüî•üî§abcdefghijklmnopqrstuvwxyzüî§
üçâ
```
[Answer]
# [Haskell](https://www.haskell.org/), 66 bytes
```
sum.map(\c->1+read["02210313074020029000033739"!!(fromEnum c-65)])
```
[Try it online!](https://tio.run/##DcGxDoIwEADQXzmIA8SUHK1CGHAhxrWjiThcaivEtpgW4t9bfW@i@NLWJgP9mOLmKkfvYlTsVO@DpsctR85rFLXA9oAckXf4J0QrujzLChMWd/abA8WaY3kvk6PZQw@zX3UgtcIO4rR8oAKTpBwuX2UsPWNi10HKHw "Haskell ‚Äì Try It Online") Same approach as [DanielIndie's JavaScript answer](https://codegolf.stackexchange.com/a/162608/56433).
---
### [Haskell](https://www.haskell.org/), ~~82~~ 81 bytes
```
sum.map(\c->1+sum(read.pure<$>lookup c(zip"DGBCMPFHVWYKJXQZ""1122223333347799")))
```
[Try it online!](https://tio.run/##FcfBCoIwGADgV/kZHibhYBWIkB4yMopgXcrCy1gzxU3HpgQ9fMu@29dw10mlfA1p5d2kieYGVyLK6GIetpI/iZms3ASZGoZuMiDwpzVoV2zzM9sfrrf76VheHghRupyt/tZxnCQoDEOvedtDCm0/SsvFCAG4ZngDgdozlhdfUSv@cj4qc8Z@ "Haskell ‚Äì Try It Online")
[Answer]
# [PowerShell](https://github.com/TryItOnline/TioSetup/wiki/Powershell), 60 bytes
```
$args|% t*y|%{$s+='02210313074020029000033739'[$_-65]-47}
$s
```
[Try it online!](https://tio.run/##K8gvTy0qzkjNyfn/XyWxKL24RlWhRKuyRrVapVjbVt3AyMjQwNjQ2MDcxMDIwMDI0gAIjI3NjS3Vo1Xidc1MY3VNzGu5VIr////v6OTs4urm7uHp5e3j6@cfEBgUHBIaFh4RGQUA "PowerShell ‚Äì Try It Online")
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 21 bytes
Takes input as a lowercase list of characters.
```
‚Ä¢_J√ä¬ø√π√£$∆µ¬Ω≈ìM‚Ä¢11–≤AIk√®O
```
[Try it online!](https://tio.run/##MzBNTDJM/f//UcOieK/DXYf2H955eLHKsa2H9h6d7AsUNDS8sMnRM/vwCv///6PV09R1FNQzQUQVnEgCEaVIYrEA "05AB1E ‚Äì Try It Online")
or as a [Test suite](https://tio.run/##MzBNTDJM/V9TVvn/UcOieK/DXYf2H955eLHKsa2H9h6d7AsUNDS8sMmxMvvwCv//lUqH9yvo2ikc3q@k8z9aPVFdR0E9CUQkq8dyRasXgJgFED6QSAcLFoOYJSAiFUSUg4hMCBckXQpRCdNYCSKyQUQFiCgEq0mD66mCE2BrS5HEQAqRHQQkUuC2psFtyYCblQW3KgdE5IKIPBCRD3dNIYgoAhEIX4DtLIN7pQLuaqATAA)
[Answer]
# [Octave](https://www.gnu.org/software/octave/), 73 bytes
```
@(x)sum('09977433333222211'(([~,y]=ismember(x,'QZJXKFHVWYBCMPDG'))+1)-47)
```
[Try it online!](https://tio.run/##Vc1LC4JAFAXgfb/CTdwZKmlSmFwYpamZWWP5nGhRYdBCgl7Upr9uTi3Ks7rwncM97a/be14edFmWyyF64MutQNDVNEpVRaRXhRBAaP1qPzf68VLkxS4/o0cbAj5NPXsSJ5lh@mzsAMYtgjsqxeUBwcgwQRLBUlOSOgNx0kYFjJkO1IEQAavQSlwLagtNQOSwzEsD@ANFEWC7nBsR5/AD9bOono8t25m4U2/mzxcsWK7CKE7S7Futmn1avgE "Octave ‚Äì Try It Online")
Uses `ismember` to map each character in the input stream `x` onto it's index in the lookup string `'QZJXKFHVWYBCMPDG'`. Any element not found will be mapped to an index of 0 (this will include the 1-point characters).
Next we add 1 to the index to make the 0's become valid 1-index references, and lookup into the string `'09977433333222211'`. This is one element longer than the first lookup string. The digits represent the point value of each element in the original string, minus 1, with the extra element being a '0' at the `beginning` .
Finally the resultant string is converted to integers by subtracting `47` (`'0'-1`), yielding the point value for each letter, and all point values are then summed.
[Answer]
# C++, 95 bytes
```
char*m="02210313074020029000033739";
int f(char*p){int n=0;while(*p)n+=m[*p++-65]-47;return n;}
```
[Try it online](https://ideone.com/bdo5Ko) (not a TIO link sorry)
Explanation:
* Declares `m`, an array of the values of each letter in order, minus 1. The minus 1 is because of Q and Z: I couldn't have a two digit number in there
* Iterates through through the string `p` until we get to null character, and adds the score of the number (`*p` gives us the letter, and `-65` so we can properly index the array). Since `m` is a `char*` it converts to a `char` so we minus `48` so bring it back to 0, but add `1` since `m` is declared as one score less for each character.
I'm not an avid poster here so I hope I've done this correctly. I believe they returning `n` counts as printing the value, and that declaring a function is fine.
[Answer]
# [K (oK)](https://github.com/JohnEarnest/ok), ~~60~~ 38 bytes
**Solution:**
```
+/1+.:'"02210313074020029000033739"65!
```
[Try it online!](https://tio.run/##y9bNz/7/X1vfUFvPSl3JwMjI0MDY0NjA3MTAyMDAyNIACIyNzY0tlcxMFZUcnZxdXN3cPTy9vH18/fwDAoOCQ0LDwiMio5T@/wcA "K (oK) ‚Äì Try It Online")
**Explanation:**
Index into the scores, sum up result.
```
+/1+.:'"02210313074020029000033739"65! / the solution
                                   65! / input modulo 65 to get position in A-Z
       "02210313074020029000033739"    / index into the scores (1 point lower)
    .:'                                / value (.:) each (') to convert to ints
  1+                                   / increase by 1
+/                                     / sum up
```
[Answer]
# PowerShell, 92 bytes
```
$args|% T*y|%{$i+=switch -r($_){[DG]{2}[BCMP]{3}[FHVWY]{4}K{5}[JX]{8}[QZ]{10}default{1}}};$i
```
[Try it online!](https://tio.run/##K8gvTy0qzkjNyfn/XyWxKL24RlUhRKuyRrVaJVPbtrg8syQ5Q0G3SEMlXrM62sU9ttqoNtrJ2Tcgttq4NtrNIyw8MrbapNa72rQ22isittqiNjowKrba0KA2JTUtsTSnpNqwtrbWWiXz////jk7OAA "PowerShell ‚Äì Try It Online")
Didn't notice @Add-TheNewOne's answer before writing this, but I think it's fairly different in any case.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 18 bytes
```
‚Ä¢Q<√ü√∑Œªv¬∏√è√†≈ì¬∂‚Ä¢I√á√®>O
```
[Try it online!](https://tio.run/##ATIAzf9vc2FiaWX//@KAolE8w5/Dt867dsK4w4/DoMWTwrbigKJJw4fDqD5P//9maXp6YnV6eg)
Explanation:
```
‚Ä¢Q<√ü√∑Œªv¬∏√è√†≈ì¬∂‚Ä¢           # compressed integer 30740200290000337390221031
             I√á         # codepoints of the input
               √®        # index into the digits of the large integer
                >       # increment each
                 O      # sum
```
The large integer encodes the point value of each letter. Since encoding numbers in the range 1-10 would be inconvenient, we subtract 1 so that each one fits on a single digit (this is why the `>` is needed).
Note that indexing in 05AB1E wraps around, so the first digit of the number actually corresponds to "h" ("h"'s codepoint is 104, which is 0 mod 26). This is convenient: since numbers can't start with 0, we don't want the first digit to correspond to "a".
Alternative 18-byter:
```
A‚Ä¢Œò¬°‚ÇÜ√∂Œ∑√ñ&'/Œ±¬∞‚Ä¢R‚Ä°>O
```
[Try it online!](https://tio.run/##yy9OTMpM/f/f8VHDonMzDi181NR2eNu57Yenqanrn9t4aANQOOhRw0I7////o5XSlHQUlDJBRBWcSAIRpUhisQA)
`A` pushes "abcdefghijklmnopqrstuvwxyz". `‚Ä°` transliterates, replacing each letter in the input with the corresponding digit in the compressed integer. `A‚Ä°` saves one byte over `I√á√®`; unfortunately, this encoding puts "a" first, so we have to use `R` (reverse) to get around the issue that numbers can't start with 0.
Yet another 18-byter:
```
≈æW‚Ä¢Œî√ø¬¶√ùZ=√°√≠4_√∏‚Ä¢‚Ä°>O
```
[Try it online!](https://tio.run/##yy9OTMpM/f//6L7wRw2Lzk05vP/QssNzo2wPLzy81iT@8A6g4KOGhXb@//9HK6Up6SgoZYKIKjiRBCJKkcRiAQ)
Same idea as above, but this one uses the obscure `≈æW` built-in to push "qwertyuiopasdfghjklzxcvbnm". `≈æW` is one byte longer than `A`, but it saves the `R` since "q" isn't a 1-point letter.
[Answer]
# [Beatnik](https://esolangs.org/wiki/Beatnik), 379 bytes
```
K ZZZZKF ZD ZD ZD ZD ZD ZD ZD
K ZZZZZZZZA J Z ZD ZB B
K XA KD ZD ZF F ZA ZD KF KF ZD ZB B
K D Z ZD ZB B
K ZF Z ZD ZF KA ZA ZD ZD KF KF KF ZD ZB B
K A KD ZD ZF D ZA KF ZD ZB B
K ZF KD ZD ZB B
K D Z ZD ZB B
K A Z ZD ZB B
K ZF Z ZD ZB B
K D Z ZD ZF D ZA KF ZD ZB B
K Z KD ZD ZB B
K B Z ZD ZB B
K Z Z ZD ZB B
K A Z ZD ZF F ZA KF ZB Z
K K KD ZD ZB B
K B Z ZF A KF
KF
XX ZZZZZZZZZZZZZX
```
[Try it online!](https://tio.run/##dZBLDsIwDET3PYWv4hAM1ED5E7IDiUWFxIr7p3YTVVgEy4vIM/Ms5/G8f979KyWGKMUE0f92k1UthBbiOHXgZB4QOLsIJIz6FEoBZY83CTHGEmAsiSlkcl9or0Yjatz/XYL1ldZaxVqqs5zqjnK4YsQuAlcYpNdQIx3C9JljhZTQzfycFstVy@vNttvtD8fT@XIN8TYA "Beatnik ‚Äì Try It Online")
See also [MickyT's answer](https://codegolf.stackexchange.com/a/162975/25180).
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 36 bytes
```
¬¨¬£2+`dg
bcmp
fhvwy
k
jx
qz`¬∑b√∏X
x
```
Takes input as a lowercase string, returns a number.  
Short explanation:
```
¬¨¬£2+`dg
¬¨       // Split the input into chars,
 ¬£      // then map over each char, returning
  2+`dg // 2 plus
qz`¬∑b√∏X
    b√∏X // the char's index in
qz`¬∑    // the hardcoded string split by newlines.
x       // And finally sum the whole thing.
```
[Try it online!](https://tio.run/##y0osKPn//9CaQ4uNtBNS0rmSknMLuNIyysorubK5uLiyKri4CqsSDm1POrwjgqvi/3@ltMyqqqTSqiolAA "Japt ‚Äì Try It Online")
[Answer]
# [Ruby](https://www.ruby-lang.org/), 60 bytes
```
->s{s.sum{|c|"BDDCBECEBIFBDBBDKBBBBEEIEK"[c.ord-65].ord-65}}
```
[Try it online!](https://tio.run/##dY7daoNAEIXvfYphQGhBhZC2aQumdHW11v6YJjaJshdWVxJIk@AqpMQ8u11S0ytzbobhfHPOFNXXT5ObjT4Ue2GI6ntfpzUS27YItSjxHGITYvtEilKP@hinxqbI9Jtr1s7DoYkVgBgfiYXQLQ1gwLQjFQSWi@eoXq@lxhM69SieybprqdAN5v5shJ1Uv99SjhdFJIwi7KKuTlnye5s67pP37L@8vr0Ho4/xJPyczuYRanA7YAozeJIuINtAvVxvq1IDvtvytORZLQMKLqpVCSbk8dE10kVSCCYduQjAC1VcgipAH4KaIagQny7M/xx4ANwmQiDcA@bJciWb26o/mCl8nTW/ "Ruby ‚Äì Try It Online")
A lambda, accepting input as an array of (uppercase) characters and returning an integer.
[Answer]
# [Perl 5](https://www.perl.org/) `-pF`, 50 bytes
```
_1DG2BCMP3FHVWY4K7JX9QZ=~/\d\D*$_/,$\+=1+$&for@F}{
```
[Try it online!](https://tio.run/##K0gtyjH9/z/e0MXdyMnZN8DYzSMsPNLE29wrwjIwyrZOPyYlxkVLJV5fRyVG29ZQW0UtLb/Iwa22@v9/RydnF1c3dw9PL28fXz//gMCg4JDQsPCIyKh/@QUlmfl5xf91C9wA "Perl 5 ‚Äì Try It Online")
[Answer]
# [Gforth](https://www.gnu.org/software/gforth/), 109 Bytes
```
: V s" 1332142418513113:11114484:" ; : C 0 NAME 0 DO DUP C@ 65 - V DROP + C@ 48 - ROT + SWAP 1+ LOOP DROP . ;
```
Input must be uppercase:  
`C PPCG 11 OK`
## Readable
```
\ String used as table with values for each letter in the alphabet
\ : follows 9 in the ASCII-table
: V
   s" 1332142418513113:11114484:"
;
: C
   0                   \ Initialize sum        ( sum               )
   NAME                \ Get the string        ( sum  c-addr count )
   0 DO                \ Start of loop         ( sum  c-addr       )
      DUP C@           \ Get letter            ( sum  c-addr char  )
      65 -             \ Calculate table index ( sum  c-addr index )
      V DROP + C@      \ Get table entry       ( sum  c-addr entry )
      48 -             \ Calculate entry value ( sum  c-addr value )
      ROT + SWAP       \ Update sum            ( sum' c-addr       )
      1+               \ Next character        ( sum' c-addr'      )
   LOOP
   DROP .              \ Drop c-addr and print result
;
```
[Try it online!](https://tio.run/##HYvNDoJAEINfpeFKMA47mM1ykewSLspO8O8N0JuJ8P7DYC9Nv7bz97d@qve8m2rAE0sBcq4mrpl8Q47IBTIxew4FWgREHDF2194sZaSHIJ5xalDZPU1ZUO6AvYEp3y3dXp2ASlyylf/FAa1GiMRBVTc "Forth (gforth) ‚Äì Try It Online")
[Answer]
# [Perl 6](https://github.com/nxadm/rakudo-pkg), 52 bytes
```
{TR/A..Z/02210313074020029000033739/.comb.sum+.ords}
```
[Try it online!](https://tio.run/##K0gtyjH7n1upoJZq@786JEjfUU8vSt/AyMjQwNjQ2MDcxMDIwMDI0gAIjI3NjS319ZLzc5P0iktztfXyi1KKa/9bcxUngrRrKIW6B0R6RwQqaSKEHJ2cXVzd3D08vbx9fP38AwKDgkNCw8IjIqOAqv4DAA "Perl 6 ‚Äì Try It Online")
Maps every character to a digit, and sums them. And adds 1 for each character because there isn't a digit 10 without incurring unicode bytes.
[Answer]
# [Retina 0.8.2](https://github.com/m-ender/retina/wiki/The-Language/a950ad7d925ec9316e3e2fb2cf5d49fd15d23e3d), 41 bytes
```
T`BCDGJKMPQXZF\HVWY`221174229793
.
$*..
.
```
[Try it online!](https://tio.run/##K0otycxL/K@q4Z7wPyTBydnF3cvbNyAwIsotxiMsPDLByMjQ0NzEyMjS3NKYS49LRUtPj0vv/39HJ2eugABnd67gENdwT1euUPeASO@IQC43z6gop9CoKC6gAhdXN3cPTy9vH18//4DAoOCQ0LDwiMgoAA "Retina 0.8.2 ‚Äì Try It Online") Link includes test cases. Explanation: Like the Haskell answer, nontrivial letters are translated to 1 less than their score, and 1 is added later when the characters are converted to unary. Putting `FHVWY` last allows them all to map to a score of 3 + 1.
[Answer]
# C (gcc), ~~78~~ 72 bytes
```
i;f(char*s){for(i=0;*s;)i+="\n\n"[*s++-65];s=i;}
```
There are actually 26 characters in that string. See the code rendered properly and run it [here](https://tio.run/##S9ZNT07@/z/TOk0jOSOxSKtYszotv0gj09bAWqvYWjNT21aJkZmZiZGFiYWRg5WRmZGROSaPEQhYWDhYYvKUorWKtbV1zUxjrYttM61r/@cmZuZpaCpUc3EWFGXmlaRpKKmmAJXpKABZjk7OLq5u7h6eXt4@vn7@AYFBwSGhYeERkVFKmprWXLX/AQ).
Thanks to [gastropner](https://codegolf.stackexchange.com/users/75886/gastropner) for golfing 6 bytes.
Ungolfed version:
```
i; // declare a variable to store the score; it is implicitly of type int
f(char* s) { // function taking a string as argument and implicitly returning an int
    for(i = 0; // initialize the score to 0
        *s; ) // iterate over the string until we hit terminating NUL byte
        i += "\n\n"[*s++ - 65]; // this is a 26-char string containing the ASCII equivalent of each numeric scrabble value; 65 is ASCII code for 'A', mapping the alphabet onto the string
    s = i; // implicitly return the score
}
```
[Answer]
# Excel, 91 bytes
```
{=LEN(A1)+SUM(0+("0"&MID("02210313074020029000033739",CODE(MID(A1,ROW(A:A),1)&"z")-64,1)))}
```
Explanation:
* Input is in cell `A1`
* The formula must be entered as an array formula with `Ctrl`+`Shift`+`Enter`, which adds the curly brackets `{ }` to both ends.
* `MID(A1,ROW(A:A),1)` pulls out each character in turn (and a lot of empty values, too, since it's going to return as many values as there are rows in the sheet)
* `CODE(MID(~)&"z")` pulls out the ASCII value for the each character. The `&"z"` appends a `z` to the end of the `MID()` result because `CODE()` doesn't like empty inputs. The ASCII value for `z` is higher than every capital letter, though, so it's effectively ignored later.
* `MID("02210313074020029000033739",CODE(~)-64,1)` pulls out a letter from the score string based on its ASCII value adjusted down by 64 so the letters run 1-26 instead of 65-90.
* `"0"&MID(~)` prepends a zero to the `MID()` result because Excel won't let you do math with empty strings, of which there will be several.
* `0+("0"&MID(~))` turns all those strings into numbers.
* `SUM(0+("0"&MID(~)))` adds up all those strings that are now numbers.
* `LEN(A1)+SUM(~)` adds the length of the input to the sum because all the values in the score string (`02210313074020029000033739`) were adjusted down by one so they would all be one digit long.
---
There's a very similar solution in Google Sheets but it comes in at 97 bytes because `ArrayFromula()` is longer than `{}` (but at least it can handle `0 + "" = 0`).
```
=Len(A1)+ArrayFormula(Sum(0+Mid("02210313074020029000033739",Code(Mid(A1,Row(A:A),1)&"z")-64,1)))
```
]