Skip to content

Commit 773cb40

Browse files
authored
Sync practice exercise docs (#1456)
1 parent 038d04e commit 773cb40

File tree

21 files changed

+100
-106
lines changed

21 files changed

+100
-106
lines changed

exercises/practice/affine-cipher/.docs/instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The affine cipher is a type of monoalphabetic substitution cipher.
66
Each character is mapped to its numeric equivalent, encrypted with a mathematical function and then converted to the letter relating to its new numeric value.
77
Although all monoalphabetic ciphers are weak, the affine cipher is much stronger than the atbash cipher, because it has many more keys.
88

9-
[comment]: # ( monoalphabetic as spelled by Merriam-Webster, compare to polyalphabetic )
9+
[//]: # ( monoalphabetic as spelled by Merriam-Webster, compare to polyalphabetic )
1010

1111
## Encryption
1212

exercises/practice/allergies/.docs/instructions.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@ An allergy test produces a single numeric score which contains the information a
66

77
The list of items (and their value) that were tested are:
88

9-
* eggs (1)
10-
* peanuts (2)
11-
* shellfish (4)
12-
* strawberries (8)
13-
* tomatoes (16)
14-
* chocolate (32)
15-
* pollen (64)
16-
* cats (128)
9+
- eggs (1)
10+
- peanuts (2)
11+
- shellfish (4)
12+
- strawberries (8)
13+
- tomatoes (16)
14+
- chocolate (32)
15+
- pollen (64)
16+
- cats (128)
1717

1818
So if Tom is allergic to peanuts and chocolate, he gets a score of 34.
1919

2020
Now, given just that score of 34, your program should be able to say:
2121

22-
* Whether Tom is allergic to any one of those allergens listed above.
23-
* All the allergens Tom is allergic to.
22+
- Whether Tom is allergic to any one of those allergens listed above.
23+
- All the allergens Tom is allergic to.
2424

2525
Note: a given score may include allergens **not** listed above (i.e. allergens that score 256, 512, 1024, etc.).
2626
Your program should ignore those components of the score.

exercises/practice/bowling/.docs/instructions.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ The game consists of 10 frames.
1111
A frame is composed of one or two ball throws with 10 pins standing at frame initialization.
1212
There are three cases for the tabulation of a frame.
1313

14-
* An open frame is where a score of less than 10 is recorded for the frame.
14+
- An open frame is where a score of less than 10 is recorded for the frame.
1515
In this case the score for the frame is the number of pins knocked down.
1616

17-
* A spare is where all ten pins are knocked down by the second throw.
17+
- A spare is where all ten pins are knocked down by the second throw.
1818
The total value of a spare is 10 plus the number of pins knocked down in their next throw.
1919

20-
* A strike is where all ten pins are knocked down by the first throw.
20+
- A strike is where all ten pins are knocked down by the first throw.
2121
The total value of a strike is 10 plus the number of pins knocked down in the next two throws.
2222
If a strike is immediately followed by a second strike, then the value of the first strike cannot be determined until the ball is thrown one more time.
2323

@@ -50,7 +50,7 @@ For a tenth frame of XXX (three strikes), the total value is 30.
5050
Write code to keep track of the score of a game of bowling.
5151
It should support two operations:
5252

53-
* `roll(pins : int)` is called each time the player rolls a ball.
53+
- `roll(pins : int)` is called each time the player rolls a ball.
5454
The argument is the number of pins knocked down.
55-
* `score() : int` is called only at the very end of the game.
55+
- `score() : int` is called only at the very end of the game.
5656
It returns the total score for that game.

exercises/practice/darts/.docs/instructions.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ Write a function that returns the earned points in a single toss of a Darts game
66

77
In our particular instance of the game, the target rewards 4 different amounts of points, depending on where the dart lands:
88

9-
* If the dart lands outside the target, player earns no points (0 points).
10-
* If the dart lands in the outer circle of the target, player earns 1 point.
11-
* If the dart lands in the middle circle of the target, player earns 5 points.
12-
* If the dart lands in the inner circle of the target, player earns 10 points.
9+
- If the dart lands outside the target, player earns no points (0 points).
10+
- If the dart lands in the outer circle of the target, player earns 1 point.
11+
- If the dart lands in the middle circle of the target, player earns 5 points.
12+
- If the dart lands in the inner circle of the target, player earns 10 points.
1313

1414
The outer circle has a radius of 10 units (this is equivalent to the total radius for the entire target), the middle circle a radius of 5 units, and the inner circle a radius of 1.
1515
Of course, they are all centered at the same point (that is, the circles are [concentric][] defined by the coordinates (0, 0).
@@ -18,6 +18,6 @@ Write a function that given a point in the target (defined by its [Cartesian coo
1818

1919
[darts]: https://en.wikipedia.org/wiki/Darts
2020
[darts-target]: https://en.wikipedia.org/wiki/Darts#/media/File:Darts_in_a_dartboard.jpg
21-
[concentric]: http://mathworld.wolfram.com/ConcentricCircles.html
21+
[concentric]: https://mathworld.wolfram.com/ConcentricCircles.html
2222
[cartesian-coordinates]: https://www.mathsisfun.com/data/cartesian-coordinates.html
2323
[real-numbers]: https://www.mathsisfun.com/numbers/real-numbers.html

exercises/practice/diamond/.docs/instructions.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ Given a letter, it prints a diamond starting with 'A', with the supplied letter
55

66
## Requirements
77

8-
* The first row contains one 'A'.
9-
* The last row contains one 'A'.
10-
* All rows, except the first and last, have exactly two identical letters.
11-
* All rows have as many trailing spaces as leading spaces. (This might be 0).
12-
* The diamond is horizontally symmetric.
13-
* The diamond is vertically symmetric.
14-
* The diamond has a square shape (width equals height).
15-
* The letters form a diamond shape.
16-
* The top half has the letters in ascending order.
17-
* The bottom half has the letters in descending order.
18-
* The four corners (containing the spaces) are triangles.
8+
- The first row contains one 'A'.
9+
- The last row contains one 'A'.
10+
- All rows, except the first and last, have exactly two identical letters.
11+
- All rows have as many trailing spaces as leading spaces. (This might be 0).
12+
- The diamond is horizontally symmetric.
13+
- The diamond is vertically symmetric.
14+
- The diamond has a square shape (width equals height).
15+
- The letters form a diamond shape.
16+
- The top half has the letters in ascending order.
17+
- The bottom half has the letters in descending order.
18+
- The four corners (containing the spaces) are triangles.
1919

2020
## Examples
2121

exercises/practice/food-chain/.docs/instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ I know an old lady who swallowed a horse.
6161
She's dead, of course!
6262
```
6363

64-
[cumulative-song]: http://en.wikipedia.org/wiki/Cumulative_song
64+
[cumulative-song]: https://en.wikipedia.org/wiki/Cumulative_song

exercises/practice/grep/.docs/instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,4 @@ The `grep` command should support multiple flags at once.
7676
For example, running `grep -l -v "hello" file1.txt file2.txt` should
7777
print the names of files that do not contain the string "hello".
7878

79-
[grep]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html
79+
[grep]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html

exercises/practice/hello-world/.docs/instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ The objectives are simple:
1313

1414
If everything goes well, you will be ready to fetch your first real exercise.
1515

16-
[hello-world]: http://en.wikipedia.org/wiki/%22Hello,_world!%22_program
16+
[hello-world]: https://en.wikipedia.org/wiki/%22Hello,_world!%22_program

exercises/practice/house/.docs/instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,4 @@ that ate the malt
102102
that lay in the house that Jack built.
103103
```
104104

105-
[papyr]: http://papyr.com/hypertextbooks/grammar/ph_noun.htm
105+
[papyr]: https://papyr.com/hypertextbooks/grammar/ph_noun.htm

exercises/practice/leap/.docs/instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ Though our exercise adopts some very simple rules, there is more to learn!
1919

2020
For a delightful, four minute explanation of the whole leap year phenomenon, go watch [this youtube video][video].
2121

22-
[video]: http://www.youtube.com/watch?v=xX96xng7sAE
22+
[video]: https://www.youtube.com/watch?v=xX96xng7sAE

0 commit comments

Comments
 (0)