Skip to content

Commit 0410dcc

Browse files
authored
December 2025 practice exercise docs sync. (#4058)
Pulled in latest exercise introductions and instructions from problem-specifications.
1 parent 6865784 commit 0410dcc

File tree

4 files changed

+33
-58
lines changed

4 files changed

+33
-58
lines changed

exercises/practice/killer-sudoku-helper/.docs/instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ You can also find Killer Sudokus in varying difficulty in numerous newspapers, a
7474

7575
## Credit
7676

77-
The screenshots above have been generated using [F-Puzzles.com](https://www.f-puzzles.com/), a Puzzle Setting Tool by Eric Fox.
77+
The screenshots above have been generated using F-Puzzles.com, a Puzzle Setting Tool by Eric Fox.
7878

7979
[sudoku-rules]: https://masteringsudoku.com/sudoku-rules-beginners/
8080
[killer-guide]: https://masteringsudoku.com/killer-sudoku/
Lines changed: 24 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,47 @@
11
# Instructions
22

3-
Given a 3 x 4 grid of pipes, underscores, and spaces, determine which number is represented, or whether it is garbled.
3+
Optical Character Recognition or OCR is software that converts images of text into machine-readable text.
4+
Given a grid of characters representing some digits, convert the grid to a string of digits.
5+
If the grid has multiple rows of cells, the rows should be separated in the output with a `","`.
46

5-
## Step One
7+
- The grid is made of one of more lines of cells.
8+
- Each line of the grid is made of one or more cells.
9+
- Each cell is three columns wide and four rows high (3x4) and represents one digit.
10+
- Digits are drawn using pipes (`"|"`), underscores (`"_"`), and spaces (`" "`).
611

7-
To begin with, convert a simple binary font to a string containing 0 or 1.
12+
## Edge cases
813

9-
The binary font uses pipes and underscores, four rows high and three columns wide.
14+
- If the input is not a valid size, your program should indicate there is an error.
15+
- If the input is the correct size, but a cell is not recognizable, your program should output a `"?"` for that character.
1016

11-
```text
12-
_ #
13-
| | # zero.
14-
|_| #
15-
# the fourth row is always blank
16-
```
17+
## Examples
1718

18-
Is converted to "0"
19-
20-
```text
21-
#
22-
| # one.
23-
| #
24-
# (blank fourth row)
25-
```
26-
27-
Is converted to "1"
28-
29-
If the input is the correct size, but not recognizable, your program should return '?'
30-
31-
If the input is the incorrect size, your program should return an error.
32-
33-
## Step Two
34-
35-
Update your program to recognize multi-character binary strings, replacing garbled numbers with ?
36-
37-
## Step Three
38-
39-
Update your program to recognize all numbers 0 through 9, both individually and as part of a larger string.
40-
41-
```text
42-
_
43-
_|
44-
|_
45-
46-
```
47-
48-
Is converted to "2"
19+
The following input (without the comments) is converted to `"1234567890"`.
4920

5021
```text
5122
_ _ _ _ _ _ _ _ #
52-
| _| _||_||_ |_ ||_||_|| | # decimal numbers.
23+
| _| _||_||_ |_ ||_||_|| | # Decimal numbers.
5324
||_ _| | _||_| ||_| _||_| #
54-
# fourth line is always blank
25+
# The fourth line is always blank,
5526
```
5627

57-
Is converted to "1234567890"
58-
59-
## Step Four
28+
The following input is converted to `"123,456,789"`.
6029

61-
Update your program to handle multiple numbers, one per line.
62-
When converting several lines, join the lines with commas.
30+
<!-- prettier-ignore-start -->
6331

6432
```text
65-
_ _
33+
_ _
6634
| _| _|
6735
||_ _|
68-
69-
_ _
70-
|_||_ |_
36+
37+
_ _
38+
|_||_ |_
7139
| _||_|
72-
73-
_ _ _
40+
41+
_ _ _
7442
||_||_|
7543
||_| _|
76-
44+
7745
```
7846

79-
Is converted to "123,456,789".
47+
<!-- prettier-ignore-end -->
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Introduction
2+
3+
Your best friend Marta recently landed their dream job working with a local history museum's collections.
4+
Knowing of your interests in programming, they confide in you about an issue at work for an upcoming exhibit on computing history.
5+
A local university's math department had donated several boxes of historical printouts, but given the poor condition of the documents, the decision has been made to digitize the text.
6+
However, the university's old printer had some quirks in how text was represented, and your friend could use your help to extract the data successfully.

exercises/practice/triangle/.docs/instructions.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ A _scalene_ triangle has all sides of different lengths.
1414
For a shape to be a triangle at all, all sides have to be of length > 0, and the sum of the lengths of any two sides must be greater than or equal to the length of the third side.
1515

1616
~~~~exercism/note
17-
We opted to not include tests for degenerate triangles (triangles that violate these rules) to keep things simpler.
17+
_Degenerate triangles_ are triangles where the sum of the length of two sides is **equal** to the length of the third side, e.g. `1, 1, 2`.
18+
We opted to not include tests for degenerate triangles in this exercise.
1819
You may handle those situations if you wish to do so, or safely ignore them.
1920
~~~~
2021

0 commit comments

Comments
 (0)