From c651f3f5938159e9e69b207e9cee2c4668794f93 Mon Sep 17 00:00:00 2001 From: Katrina Owen Date: Thu, 16 Feb 2023 14:04:15 +0100 Subject: [PATCH 1/4] Rework two-fer documentation This splits two-fer into separate introduction and instructions documents. It also rewords the exercise to feel a bit less stilted, and (hopefully) a bit more friendly. It adds a bit of explanation for the definition of the term two-fer and where it comes from, as well as providing a bit of context ("story", if you will) for the exercise itself. --- exercises/two-fer/description.md | 27 --------------------------- exercises/two-fer/instructions.md | 24 ++++++++++++++++++++++++ exercises/two-fer/introduction.md | 8 ++++++++ 3 files changed, 32 insertions(+), 27 deletions(-) delete mode 100644 exercises/two-fer/description.md create mode 100644 exercises/two-fer/instructions.md create mode 100644 exercises/two-fer/introduction.md diff --git a/exercises/two-fer/description.md b/exercises/two-fer/description.md deleted file mode 100644 index cbc1b9d03b..0000000000 --- a/exercises/two-fer/description.md +++ /dev/null @@ -1,27 +0,0 @@ -# Description - -`Two-fer` or `2-fer` is short for two for one. -One for you and one for me. - -Given a name, return a string with the message: - -```text -One for name, one for me. -``` - -Where "name" is the given name. - -However, if the name is missing, return the string: - -```text -One for you, one for me. -``` - -Here are some examples: - -|Name |String to return -|:-------|:------------------ -|Alice |One for Alice, one for me. -|Bob |One for Bob, one for me. -| |One for you, one for me. -|Zaphod |One for Zaphod, one for me. diff --git a/exercises/two-fer/instructions.md b/exercises/two-fer/instructions.md new file mode 100644 index 0000000000..dadb0f09af --- /dev/null +++ b/exercises/two-fer/instructions.md @@ -0,0 +1,24 @@ +# Instructions + +Your task is to determine what you will say to your friend as you hand them their cookie. + +If your friend is named Do-yun, then you will say: + +```text +One for Do-yun, one for me. +``` + +On the other hand, if for some reason you can't remember your friend's name just then, you'll say _you_ instead of their name: + +```text +One for you, one for me. +``` + +Here are some examples: + +|Name |Dialogue +|:-------|:------------------ +|Alice |One for Alice, one for me. +|Bohdan |One for Bohdan, one for me. +| |One for you, one for me. +|Zaphod |One for Zaphod, one for me. diff --git a/exercises/two-fer/introduction.md b/exercises/two-fer/introduction.md new file mode 100644 index 0000000000..beaf44e432 --- /dev/null +++ b/exercises/two-fer/introduction.md @@ -0,0 +1,8 @@ +# Introduction + +In some English accents, when you say "two for" quickly, it sounds like "two fer". +Two-for-one is a way of saying that if you buy one, you also get one for free. +So the phrase "two-fer" often implies a two-for-one offer. + +Imagine a bakery that has a holiday offer where you can buy two cookies for the price of one ("two-fer one!"). +You've gone for the offer and (very generously) decided to share the extra cookie with a friend. From 5525e025504f1bfbbaa5f5ea633aacf9fa6b393d Mon Sep 17 00:00:00 2001 From: Katrina Owen Date: Fri, 24 Feb 2023 08:26:15 +0100 Subject: [PATCH 2/4] Update exercises/two-fer/introduction.md Co-authored-by: ee7 <45465154+ee7@users.noreply.github.com> --- exercises/two-fer/introduction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/two-fer/introduction.md b/exercises/two-fer/introduction.md index beaf44e432..8c124394aa 100644 --- a/exercises/two-fer/introduction.md +++ b/exercises/two-fer/introduction.md @@ -5,4 +5,4 @@ Two-for-one is a way of saying that if you buy one, you also get one for free. So the phrase "two-fer" often implies a two-for-one offer. Imagine a bakery that has a holiday offer where you can buy two cookies for the price of one ("two-fer one!"). -You've gone for the offer and (very generously) decided to share the extra cookie with a friend. +You go for the offer and (very generously) decide to give the extra cookie to a friend. From 329e432f52930d76c4b7e558694552d0ad1c0b71 Mon Sep 17 00:00:00 2001 From: Katrina Owen Date: Mon, 27 Feb 2023 12:33:47 +0100 Subject: [PATCH 3/4] Tweak two-fer docs Give a less socially awkward reason for saying 'you'. --- exercises/two-fer/instructions.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exercises/two-fer/instructions.md b/exercises/two-fer/instructions.md index dadb0f09af..fedb6fd8cf 100644 --- a/exercises/two-fer/instructions.md +++ b/exercises/two-fer/instructions.md @@ -8,7 +8,8 @@ If your friend is named Do-yun, then you will say: One for Do-yun, one for me. ``` -On the other hand, if for some reason you can't remember your friend's name just then, you'll say _you_ instead of their name: +If your friend doesn't like cookies, you give the cookie to the next person in line at the bakery. +Since you don't know their name, you will say _you_ instead. ```text One for you, one for me. From bc26086417a2fbaaf13791c742453e08dcd5026c Mon Sep 17 00:00:00 2001 From: Katrina Owen Date: Mon, 27 Feb 2023 13:06:10 +0100 Subject: [PATCH 4/4] Update exercises/two-fer/instructions.md Co-authored-by: ee7 <45465154+ee7@users.noreply.github.com> --- exercises/two-fer/instructions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/two-fer/instructions.md b/exercises/two-fer/instructions.md index fedb6fd8cf..a9bb4a3cd3 100644 --- a/exercises/two-fer/instructions.md +++ b/exercises/two-fer/instructions.md @@ -1,8 +1,8 @@ # Instructions -Your task is to determine what you will say to your friend as you hand them their cookie. +Your task is to determine what you will say as you give away the extra cookie. -If your friend is named Do-yun, then you will say: +If your friend likes cookies, and is named Do-yun, then you will say: ```text One for Do-yun, one for me.