Skip to content

Commit a006a07

Browse files
authored
Sync two-fer docs with problem-specifications (#1304)
The two-fer exercise has been overhauled as part of a project to make practice exercises more consistent and friendly. For more context, please see the discussion in the forum, as well as the pull request that updated the exercise in the problem-specifications repository: - https://forum.exercism.org/t/new-project-making-practice-exercises-more-consistent-and-human-across-exercism/3943 - exercism/problem-specifications#2204
1 parent 8ceb6da commit a006a07

File tree

2 files changed

+19
-12
lines changed

2 files changed

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

3-
`Two-fer` or `2-fer` is short for two for one. One for you and one for me.
3+
Your task is to determine what you will say as you give away the extra cookie.
44

5-
Given a name, return a string with the message:
5+
If your friend likes cookies, and is named Do-yun, then you will say:
66

77
```text
8-
One for name, one for me.
8+
One for Do-yun, one for me.
99
```
1010

11-
Where "name" is the given name.
12-
13-
However, if the name is missing, return the string:
11+
If your friend doesn't like cookies, you give the cookie to the next person in line at the bakery.
12+
Since you don't know their name, you will say _you_ instead.
1413

1514
```text
1615
One for you, one for me.
1716
```
1817

1918
Here are some examples:
2019

21-
| Name | String to return |
22-
| :----- | :-------------------------- |
23-
| Alice | One for Alice, one for me. |
24-
| Bob | One for Bob, one for me. |
25-
| | One for you, one for me. |
26-
| Zaphod | One for Zaphod, one for me. |
20+
|Name |Dialogue
21+
|:-------|:------------------
22+
|Alice |One for Alice, one for me.
23+
|Bohdan |One for Bohdan, one for me.
24+
| |One for you, one for me.
25+
|Zaphod |One for Zaphod, one for me.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Introduction
2+
3+
In some English accents, when you say "two for" quickly, it sounds like "two fer".
4+
Two-for-one is a way of saying that if you buy one, you also get one for free.
5+
So the phrase "two-fer" often implies a two-for-one offer.
6+
7+
Imagine a bakery that has a holiday offer where you can buy two cookies for the price of one ("two-fer one!").
8+
You go for the offer and (very generously) decide to give the extra cookie to a friend.

0 commit comments

Comments
 (0)