Skip to content

Commit 00e7792

Browse files
Sync the scrabble-score exercise's docs with the latest data.
1 parent 80c370a commit 00e7792

File tree

2 files changed

+23
-31
lines changed

2 files changed

+23
-31
lines changed
Lines changed: 16 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,25 @@
11
# Instructions
22

3-
Given a word, compute the Scrabble score for that word.
3+
Your task is to compute a word's Scrabble score by summing the values of its letters.
44

5-
## Letter Values
5+
The letters are valued as follows:
66

7-
You'll need these:
7+
| Letter | Value |
8+
| ---------------------------- | ----- |
9+
| A, E, I, O, U, L, N, R, S, T | 1 |
10+
| D, G | 2 |
11+
| B, C, M, P | 3 |
12+
| F, H, V, W, Y | 4 |
13+
| K | 5 |
14+
| J, X | 8 |
15+
| Q, Z | 10 |
816

9-
```text
10-
Letter Value
11-
A, E, I, O, U, L, N, R, S, T 1
12-
D, G 2
13-
B, C, M, P 3
14-
F, H, V, W, Y 4
15-
K 5
16-
J, X 8
17-
Q, Z 10
18-
```
19-
20-
## Examples
21-
22-
"cabbage" should be scored as worth 14 points:
17+
For example, the word "cabbage" is worth 14 points:
2318

2419
- 3 points for C
25-
- 1 point for A, twice
26-
- 3 points for B, twice
20+
- 1 point for A
21+
- 3 points for B
22+
- 3 points for B
23+
- 1 point for A
2724
- 2 points for G
2825
- 1 point for E
29-
30-
And to total:
31-
32-
- `3 + 2*1 + 2*3 + 2 + 1`
33-
- = `3 + 2 + 6 + 3`
34-
- = `5 + 9`
35-
- = 14
36-
37-
## Extensions
38-
39-
- You can play a double or a triple letter.
40-
- You can play a double or a triple word.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Introduction
2+
3+
[Scrabble][wikipedia] is a word game where players place letter tiles on a board to form words.
4+
Each letter has a value.
5+
A word's score is the sum of its letters' values.
6+
7+
[wikipedia]: https://en.wikipedia.org/wiki/Scrabble

0 commit comments

Comments
 (0)