From 223dc58aac23faad9a08447be01624428c7c6242 Mon Sep 17 00:00:00 2001 From: Katrina Owen Date: Mon, 27 Feb 2023 12:27:52 +0100 Subject: [PATCH 1/2] Sync bob docs with problem-specifications The bob 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 - https://github.com/exercism/problem-specifications/pull/2205 --- exercises/practice/bob/.docs/instructions.md | 27 +++++++++++--------- exercises/practice/bob/.docs/introduction.md | 10 ++++++++ 2 files changed, 25 insertions(+), 12 deletions(-) create mode 100644 exercises/practice/bob/.docs/introduction.md diff --git a/exercises/practice/bob/.docs/instructions.md b/exercises/practice/bob/.docs/instructions.md index 7888c9b76..bb702f7bb 100644 --- a/exercises/practice/bob/.docs/instructions.md +++ b/exercises/practice/bob/.docs/instructions.md @@ -1,16 +1,19 @@ # Instructions -Bob is a lackadaisical teenager. -In conversation, his responses are very limited. +Your task is to determine what Bob will reply to someone when they say something to him or ask him a question. -Bob answers 'Sure.' if you ask him a question, such as "How are you?". +Bob only ever answers one of five things: -He answers 'Whoa, chill out!' if you YELL AT HIM (in all capitals). - -He answers 'Calm down, I know what I'm doing!' if you yell a question at him. - -He says 'Fine. Be that way!' if you address him without actually saying anything. - -He answers 'Whatever.' to anything else. - -Bob's conversational partner is a purist when it comes to written communication and always follows normal rules regarding sentence punctuation in English. +- **"Sure."** + This is his response if you ask him a question, such as "How are you?" + The convention used for questions is that it ends with a question mark. +- **"Whoa, chill out!"** + This is his answer if you YELL AT HIM. + The convention used for yelling is ALL CAPITAL LETTERS. +- **"Calm down, I know what I'm doing!"** + This is what he says if you yell a question at him. +- **"Fine. Be that way!"** + This is how he responds to silence. + The convention used for silence is nothing, or various combinations of whitespace characters. +- **"Whatever."** + This is what he answers to anything else. diff --git a/exercises/practice/bob/.docs/introduction.md b/exercises/practice/bob/.docs/introduction.md new file mode 100644 index 000000000..ea4a80776 --- /dev/null +++ b/exercises/practice/bob/.docs/introduction.md @@ -0,0 +1,10 @@ +# Introduction + +Bob is a [lackadaisical][] teenager. +He likes to think that he's very cool. +And he definitely doesn't get excited about things. +That wouldn't be cool. + +When people talk to him, his responses are pretty limited. + +[lackadaisical]: https://www.collinsdictionary.com/dictionary/english/lackadaisical From 2d4efd1ee0a8ed7c5c4fefed16b1c1337c35979d Mon Sep 17 00:00:00 2001 From: Katrina Owen Date: Fri, 3 Mar 2023 12:06:30 +0100 Subject: [PATCH 2/2] Sync two-fer docs with problem-specifications 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 - https://github.com/exercism/problem-specifications/pull/2204 --- exercises/practice/two-fer/.docs/instructions.md | 16 +++++++--------- exercises/practice/two-fer/.docs/introduction.md | 8 ++++++++ 2 files changed, 15 insertions(+), 9 deletions(-) create mode 100644 exercises/practice/two-fer/.docs/introduction.md diff --git a/exercises/practice/two-fer/.docs/instructions.md b/exercises/practice/two-fer/.docs/instructions.md index bdd72bde1..a9bb4a3cd 100644 --- a/exercises/practice/two-fer/.docs/instructions.md +++ b/exercises/practice/two-fer/.docs/instructions.md @@ -1,17 +1,15 @@ # Instructions -`Two-fer` or `2-fer` is short for two for one. -One for you and one for me. +Your task is to determine what you will say as you give away the extra cookie. -Given a name, return a string with the message: +If your friend likes cookies, and is named Do-yun, then you will say: ```text -One for name, one for me. +One for Do-yun, one for me. ``` -Where "name" is the given name. - -However, if the name is missing, return the string: +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. @@ -19,9 +17,9 @@ One for you, one for me. Here are some examples: -|Name |String to return +|Name |Dialogue |:-------|:------------------ |Alice |One for Alice, one for me. -|Bob |One for Bob, 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/practice/two-fer/.docs/introduction.md b/exercises/practice/two-fer/.docs/introduction.md new file mode 100644 index 000000000..8c124394a --- /dev/null +++ b/exercises/practice/two-fer/.docs/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 go for the offer and (very generously) decide to give the extra cookie to a friend.