diff --git a/subjects/borrow_box/README.md b/subjects/borrow_box/README.md index de0f33cba4..c452202a0b 100644 --- a/subjects/borrow_box/README.md +++ b/subjects/borrow_box/README.md @@ -14,7 +14,10 @@ You will implement some **CRUD** functionality for a game session. You will need - `delete`: which takes ownership of the boxed game session and returns a string: `"game deleted: id -> 0"`, where `0` is the id of the `GameSession`. -> If `nb_games` is 5, then it is "best out of 5", and no more than 5 games can be played. If some player has a score of 3, then the game session is also finished. This is because there is an insufficient number of remaining games for the trailing player to catch up. +> Examples for `nb_games`: +> +> When `nb_games` is 5, the game is best out of 5, and if some player has a score of 3, the game is finished (there aren't enough games for the other player to draw). +> When `nb_games` is 11, the game is best out of 11, and if some player has a score of 6, the game is finished (there aren't enough games for the other player to draw). ### Expected Functions diff --git a/subjects/nextprime/README.md b/subjects/nextprime/README.md index 2eb7e7efaf..d80c8bba1a 100644 --- a/subjects/nextprime/README.md +++ b/subjects/nextprime/README.md @@ -6,7 +6,8 @@ Create a **function** which returns the first prime number which is greater than The function must be optimized, so as to avoid time-outs. -> We consider that only positive numbers can be prime numbers. +> A prime number is a natural number greater than 1 that is a not a product of two smaller natural numbers. +> 4 is not a prime number (so it's called a composite number) because it can be represented as 2 \* 2. 5 is a prime number as it can only be represented by 5 \* 1 or 1 \* 5. ### Expected function diff --git a/subjects/previousprime/README.md b/subjects/previousprime/README.md index 8cd5c12948..a3a87ba9ea 100644 --- a/subjects/previousprime/README.md +++ b/subjects/previousprime/README.md @@ -6,6 +6,9 @@ Create a **function** which returns the first prime number which is less than or If there are no smaller primes, the function should return `0`. +> A prime number is a natural number greater than 1 that is a not a product of two smaller natural numbers. +> 4 is not a prime number (so it's called a composite number) because it can be represented as 2 \* 2. 5 is a prime number as it can only be represented by 5 \* 1 or 1 \* 5. + ### Expected function ```rust diff --git a/subjects/prime_checker/README.md b/subjects/prime_checker/README.md index 2389bb3c3c..8a71fe9e40 100644 --- a/subjects/prime_checker/README.md +++ b/subjects/prime_checker/README.md @@ -8,6 +8,9 @@ The result will be `None` if the argument is less or equal one, otherwise it wil If the `u32` is prime, the function will return an`Ok(u32)`. For any other case it will return an `enum` `PrimeErr`. The `enum` `PrimeErr` will be `Even` if the number is a multiple of two or `Divider(u32)` where the `u32` is the smallest divider of the number. +> A prime number is a natural number greater than 1 that is a not a product of two smaller natural numbers. +> 4 is not a prime number (so it's called a composite number) because it can be represented as 2 \* 2. 5 is a prime number as it can only be represented by 5 \* 1 or 1 \* 5. + > Your solution should be optimized to a certain degree. ### Expected Function and structure diff --git a/subjects/scores/README.md b/subjects/scores/README.md index ff8df267c1..e7d7d5a083 100644 --- a/subjects/scores/README.md +++ b/subjects/scores/README.md @@ -2,9 +2,9 @@ ### Instructions -Lets play a little. +Let's play a little. -Create a function named `score` that given a string, computes the score for that given string as a `u64`. +Create a function named `score` that given a `&str`, computes the score for that given string as a `u64`. Each letter has a value, you just have to sum the values of the letters in the given string. @@ -21,6 +21,7 @@ You will need these: | Q, Z | 10 | ### Expected functions + > You'll need to work out the function signature for yourself. ### Usage