mirror of https://github.com/01-edu/public.git
docs(scores) correct grammar
This commit is contained in:
parent
2ad55c4c35
commit
9992555c86
|
@ -2,11 +2,11 @@
|
||||||
|
|
||||||
### Instructions
|
### Instructions
|
||||||
|
|
||||||
Lets play a little!
|
Lets play a little.
|
||||||
Create a function `score` that given a string, computes the score for that given string.
|
|
||||||
|
|
||||||
Each letter has their value, you just have to sum the values of the letters in the
|
Create a function named `score` that given a string, computes the score for that given string as a `u64`.
|
||||||
given string.
|
|
||||||
|
Each letter has a value, you just have to sum the values of the letters in the given string.
|
||||||
|
|
||||||
You will need these:
|
You will need these:
|
||||||
|
|
||||||
|
@ -20,17 +20,8 @@ You will need these:
|
||||||
| J, X | 8 |
|
| J, X | 8 |
|
||||||
| Q, Z | 10 |
|
| Q, Z | 10 |
|
||||||
|
|
||||||
### Notions
|
|
||||||
|
|
||||||
- [patterns](https://doc.rust-lang.org/book/ch18-00-patterns.html)
|
|
||||||
|
|
||||||
### Expected functions
|
### Expected functions
|
||||||
|
> You'll need to work out the function signature for yourself.
|
||||||
```rust
|
|
||||||
pub fn score(word: &str) -> u64 {
|
|
||||||
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
|
@ -55,3 +46,7 @@ $ cargo run
|
||||||
14
|
14
|
||||||
$
|
$
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Notions
|
||||||
|
|
||||||
|
- [patterns](https://doc.rust-lang.org/book/ch18-00-patterns.html)
|
||||||
|
|
Loading…
Reference in New Issue