Skip to content

Commit a5c4677

Browse files
committed
Improve docs for ocr-numbers
1 parent 2b8540f commit a5c4677

File tree

2 files changed

+24
-18
lines changed

2 files changed

+24
-18
lines changed

exercises/practice/ocr-numbers/.docs/instructions.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# Instructions
22

3-
Given a 3 x 4 grid of pipes, underscores, and spaces, determine which number is
4-
represented, or whether it is garbled.
3+
Given a 3 x 4 grid of pipes, underscores, and spaces, determine which number is represented, or whether it is garbled.
54

6-
# Step One
5+
## Step One
76

87
To begin with, convert a simple binary font to a string containing 0 or 1.
98

@@ -31,19 +30,19 @@ If the input is the correct size, but not recognizable, your program should retu
3130

3231
If the input is the incorrect size, your program should return an error.
3332

34-
# Step Two
33+
## Step Two
3534

3635
Update your program to recognize multi-character binary strings, replacing garbled numbers with ?
3736

38-
# Step Three
37+
## Step Three
3938

4039
Update your program to recognize all numbers 0 through 9, both individually and as part of a larger string.
4140

4241
```text
43-
_
42+
_
4443
_|
45-
|_
46-
44+
|_
45+
4746
```
4847

4948
Is converted to "2"
@@ -57,23 +56,24 @@ Is converted to "2"
5756

5857
Is converted to "1234567890"
5958

60-
# Step Four
59+
## Step Four
6160

62-
Update your program to handle multiple numbers, one per line. When converting several lines, join the lines with commas.
61+
Update your program to handle multiple numbers, one per line.
62+
When converting several lines, join the lines with commas.
6363

6464
```text
65-
_ _
65+
_ _
6666
| _| _|
6767
||_ _|
68-
69-
_ _
70-
|_||_ |_
68+
69+
_ _
70+
|_||_ |_
7171
| _||_|
72-
73-
_ _ _
72+
73+
_ _ _
7474
||_||_|
7575
||_| _|
76-
76+
7777
```
7878

79-
Is converted to "123,456,789"
79+
Is converted to "123,456,789".
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.

0 commit comments

Comments
 (0)