File tree Expand file tree Collapse file tree 2 files changed +15
-8
lines changed
exercises/practice/two-fer/.docs Expand file tree Collapse file tree 2 files changed +15
-8
lines changed Original file line number Diff line number Diff line change 1
1
# Instructions
2
2
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 .
4
4
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 :
6
6
7
7
``` text
8
- One for name , one for me.
8
+ One for Do-yun , one for me.
9
9
```
10
10
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.
14
13
15
14
``` text
16
15
One for you, one for me.
17
16
```
18
17
19
18
Here are some examples:
20
19
21
- |Name |String to return
20
+ |Name |Dialogue
22
21
|:-------|:------------------
23
22
|Alice |One for Alice, one for me.
24
- |Bob |One for Bob , one for me.
23
+ |Bohdan |One for Bohdan , one for me.
25
24
| |One for you, one for me.
26
25
|Zaphod |One for Zaphod, one for me.
Original file line number Diff line number Diff line change
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.
You can’t perform that action at this time.
0 commit comments