File tree Expand file tree Collapse file tree 2 files changed +15
-9
lines changed
exercises/practice/two-fer/.docs Expand file tree Collapse file tree 2 files changed +15
-9
lines changed Original file line number Diff line number Diff line change 11# Instructions
22
3- ` Two-fer ` or ` 2-fer ` is short for two for one.
4- One for you and one for me.
3+ Your task is to determine what you will say as you give away the extra cookie.
54
6- Given a name, return a string with the message :
5+ If your friend likes cookies, and is named Do-yun, then you will say :
76
87``` text
9- One for name , one for me.
8+ One for Do-yun , one for me.
109```
1110
12- Where "name" is the given name.
13-
14- 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.
1513
1614``` text
1715One for you, one for me.
1816```
1917
2018Here are some examples:
2119
22- |Name |String to return
20+ |Name |Dialogue
2321|:-------|:------------------
2422|Alice |One for Alice, one for me.
25- |Bob |One for Bob , one for me.
23+ |Bohdan |One for Bohdan , one for me.
2624| |One for you, one for me.
2725|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