You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: exercises/bowling/description.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,13 +11,13 @@ The game consists of 10 frames.
11
11
A frame is composed of one or two ball throws with 10 pins standing at frame initialization.
12
12
There are three cases for the tabulation of a frame.
13
13
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.
15
15
In this case the score for the frame is the number of pins knocked down.
16
16
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.
18
18
The total value of a spare is 10 plus the number of pins knocked down in their next throw.
19
19
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.
21
21
The total value of a strike is 10 plus the number of pins knocked down in the next two throws.
22
22
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.
23
23
@@ -50,7 +50,7 @@ For a tenth frame of XXX (three strikes), the total value is 30.
50
50
Write code to keep track of the score of a game of bowling.
51
51
It should support two operations:
52
52
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.
54
54
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.
Copy file name to clipboardExpand all lines: exercises/darts/description.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,10 +6,10 @@ Write a function that returns the earned points in a single toss of a Darts game
6
6
7
7
In our particular instance of the game, the target rewards 4 different amounts of points, depending on where the dart lands:
8
8
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.
13
13
14
14
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.
15
15
Of course, they are all centered at the same point (that is, the circles are [concentric][] defined by the coordinates (0, 0).
Copy file name to clipboardExpand all lines: exercises/list-ops/description.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,11 +7,11 @@ Implement a series of basic list operations, without using existing functions.
7
7
8
8
The precise number and names of the operations to be implemented will be track dependent to avoid conflicts with existing names, but the general operations you will implement include:
9
9
10
-
*`append` (*given two lists, add all items in the second list to the end of the first list*);
11
-
*`concatenate` (*given a series of lists, combine all items in all lists into one flattened list*);
12
-
*`filter` (*given a predicate and a list, return the list of all items for which `predicate(item)` is True*);
13
-
*`length` (*given a list, return the total number of items within it*);
14
-
*`map` (*given a function and a list, return the list of the results of applying `function(item)` on all items*);
15
-
*`foldl` (*given a function, a list, and initial accumulator, fold (reduce) each item into the accumulator from the left using `function(accumulator, item)`*);
16
-
*`foldr` (*given a function, a list, and an initial accumulator, fold (reduce) each item into the accumulator from the right using `function(item, accumulator)`*);
17
-
*`reverse` (*given a list, return a list with all the original items, but in reversed order*);
10
+
-`append` (*given two lists, add all items in the second list to the end of the first list*);
11
+
-`concatenate` (*given a series of lists, combine all items in all lists into one flattened list*);
12
+
-`filter` (*given a predicate and a list, return the list of all items for which `predicate(item)` is True*);
13
+
-`length` (*given a list, return the total number of items within it*);
14
+
-`map` (*given a function and a list, return the list of the results of applying `function(item)` on all items*);
15
+
-`foldl` (*given a function, a list, and initial accumulator, fold (reduce) each item into the accumulator from the left using `function(accumulator, item)`*);
16
+
-`foldr` (*given a function, a list, and an initial accumulator, fold (reduce) each item into the accumulator from the right using `function(item, accumulator)`*);
17
+
-`reverse` (*given a list, return a list with all the original items, but in reversed order*);
0 commit comments