Skip to content

Commit 99b947c

Browse files
🤖 Auto-sync docs, metadata, and filepaths (#2743)
Co-authored-by: SleeplessByte <[email protected]> [no important files changed]
1 parent 71d6c04 commit 99b947c

File tree

3 files changed

+19
-44
lines changed

3 files changed

+19
-44
lines changed
Lines changed: 8 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,12 @@
11
# Instructions
22

3-
Given a number from 0 to 999,999,999,999, spell out that number in English.
3+
Given a number, your task is to express it in English words exactly as your friend should say it out loud.
4+
Yaʻqūb expects to use numbers from 0 up to 999,999,999,999.
45

5-
## Step 1
6+
Examples:
67

7-
Handle the basic case of 0 through 99.
8-
9-
If the input to the program is `22`, then the output should be `'twenty-two'`.
10-
11-
Your program should complain loudly if given a number outside the blessed range.
12-
13-
Some good test cases for this program are:
14-
15-
- 0
16-
- 14
17-
- 50
18-
- 98
19-
- -1
20-
- 100
21-
22-
### Extension
23-
24-
If you're on a Mac, shell out to Mac OS X's `say` program to talk out loud.
25-
If you're on Linux or Windows, eSpeakNG may be available with the command `espeak`.
26-
27-
## Step 2
28-
29-
Implement breaking a number up into chunks of thousands.
30-
31-
So `1234567890` should yield a list like 1, 234, 567, and 890, while the far simpler `1000` should yield just 1 and 0.
32-
33-
## Step 3
34-
35-
Now handle inserting the appropriate scale word between those chunks.
36-
37-
So `1234567890` should yield `'1 billion 234 million 567 thousand 890'`
38-
39-
The program must also report any values that are out of range.
40-
It's fine to stop at "trillion".
41-
42-
## Step 4
43-
44-
Put it all together to get nothing but plain English.
45-
46-
`12345` should give `twelve thousand three hundred forty-five`.
47-
48-
The program must also report any values that are out of range.
8+
- 0 → zero
9+
- 1 → one
10+
- 12 → twelve
11+
- 123 → one hundred twenty-three
12+
- 1,234 → one thousand two hundred thirty-four
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Introduction
2+
3+
Your friend Yaʻqūb works the counter at the busiest deli in town, slicing, weighing, and wrapping orders for a never-ending line of hungry customers.
4+
To keep things moving, each customer takes a numbered ticket when they arrive.
5+
6+
When it’s time to call the next person, Yaʻqūb reads their number out loud, always in full English words to make sure everyone hears it clearly.

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ A _scalene_ triangle has all sides of different lengths.
1313

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

16+
~~~~exercism/note
17+
We opted to not include tests for degenerate triangles (triangles that violate these rules) to keep things simpler.
18+
You may handle those situations if you wish to do so, or safely ignore them.
19+
~~~~
20+
1621
In equations:
1722

1823
Let `a`, `b`, and `c` be sides of the triangle.

0 commit comments

Comments
 (0)