Skip to content

Instantly share code, notes, and snippets.

@epoch
Last active June 16, 2021 11:32
Show Gist options
  • Save epoch/cf267d540529a7371170 to your computer and use it in GitHub Desktop.
Save epoch/cf267d540529a7371170 to your computer and use it in GitHub Desktop.
scrabble score

Scrabble Score

Write a program that, given a word, computes the scrabble score for that word.

eg. the word cabbage should have a score of 14
eg. the word cat should have a score of 5

Your program should be in a file named scrabble.rb or scrabble.js.

Letter Values

Letter                           Value
A, E, I, O, U, L, N, R, S, T       1
D, G                               2
B, C, M, P                         3
F, H, V, W, Y                      4
K                                  5
J, X                               8
Q, Z                               10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment