diff --git a/exercises/practice/accumulate/.docs/instructions.md b/exercises/practice/accumulate/.docs/instructions.md index 435e0b32..c25a03fa 100644 --- a/exercises/practice/accumulate/.docs/instructions.md +++ b/exercises/practice/accumulate/.docs/instructions.md @@ -1,9 +1,6 @@ # Instructions -Implement the `accumulate` operation, which, given a collection and an -operation to perform on each element of the collection, returns a new -collection containing the result of applying that operation to each element of -the input collection. +Implement the `accumulate` operation, which, given a collection and an operation to perform on each element of the collection, returns a new collection containing the result of applying that operation to each element of the input collection. Given the collection of numbers: @@ -21,6 +18,5 @@ Check out the test suite to see the expected function signature. ## Restrictions -Keep your hands off that collect/map/fmap/whatchamacallit functionality -provided by your standard library! +Keep your hands off that collect/map/fmap/whatchamacallit functionality provided by your standard library! Solve this one yourself using other basic tools instead. diff --git a/exercises/practice/accumulate/.meta/config.json b/exercises/practice/accumulate/.meta/config.json index 6fe3b22d..dbd59a57 100644 --- a/exercises/practice/accumulate/.meta/config.json +++ b/exercises/practice/accumulate/.meta/config.json @@ -19,8 +19,11 @@ ], "example": [ ".meta/src/Example.re" + ], + "editor": [ + "src/Accumulate.rei" ] }, "source": "Conversation with James Edward Gray II", - "source_url": "https://twitter.com/jeg2" + "source_url": "http://graysoftinc.com/" } diff --git a/exercises/practice/acronym/.docs/instructions.md b/exercises/practice/acronym/.docs/instructions.md index e0515b4d..133bd2cb 100644 --- a/exercises/practice/acronym/.docs/instructions.md +++ b/exercises/practice/acronym/.docs/instructions.md @@ -4,5 +4,14 @@ Convert a phrase to its acronym. Techies love their TLA (Three Letter Acronyms)! -Help generate some jargon by writing a program that converts a long name -like Portable Network Graphics to its acronym (PNG). +Help generate some jargon by writing a program that converts a long name like Portable Network Graphics to its acronym (PNG). + +Punctuation is handled as follows: hyphens are word separators (like whitespace); all other punctuation can be removed from the input. + +For example: + +| Input | Output | +| ------------------------- | ------ | +| As Soon As Possible | ASAP | +| Liquid-crystal display | LCD | +| Thank George It's Friday! | TGIF | diff --git a/exercises/practice/acronym/.meta/config.json b/exercises/practice/acronym/.meta/config.json index a2ba04e6..44e0c656 100644 --- a/exercises/practice/acronym/.meta/config.json +++ b/exercises/practice/acronym/.meta/config.json @@ -1,5 +1,5 @@ { - "blurb": "Convert a long phrase to its acronym", + "blurb": "Convert a long phrase to its acronym.", "authors": [ "gabrielperales" ], @@ -19,6 +19,9 @@ ], "example": [ ".meta/src/Example.re" + ], + "editor": [ + "src/Acronym.rei" ] }, "source": "Julien Vanier", diff --git a/exercises/practice/all-your-base/.docs/instructions.md b/exercises/practice/all-your-base/.docs/instructions.md index c39686f2..4602b5cf 100644 --- a/exercises/practice/all-your-base/.docs/instructions.md +++ b/exercises/practice/all-your-base/.docs/instructions.md @@ -2,31 +2,32 @@ Convert a number, represented as a sequence of digits in one base, to any other base. -Implement general base conversion. Given a number in base **a**, -represented as a sequence of digits, convert it to base **b**. +Implement general base conversion. +Given a number in base **a**, represented as a sequence of digits, convert it to base **b**. ## Note - Try to implement the conversion yourself. Do not use something else to perform the conversion for you. -## About [Positional Notation](https://en.wikipedia.org/wiki/Positional_notation) +## About [Positional Notation][positional-notation] -In positional notation, a number in base **b** can be understood as a linear -combination of powers of **b**. +In positional notation, a number in base **b** can be understood as a linear combination of powers of **b**. -The number 42, *in base 10*, means: +The number 42, _in base 10_, means: -(4 * 10^1) + (2 * 10^0) +`(4 * 10^1) + (2 * 10^0)` -The number 101010, *in base 2*, means: +The number 101010, _in base 2_, means: -(1 * 2^5) + (0 * 2^4) + (1 * 2^3) + (0 * 2^2) + (1 * 2^1) + (0 * 2^0) +`(1 * 2^5) + (0 * 2^4) + (1 * 2^3) + (0 * 2^2) + (1 * 2^1) + (0 * 2^0)` -The number 1120, *in base 3*, means: +The number 1120, _in base 3_, means: -(1 * 3^3) + (1 * 3^2) + (2 * 3^1) + (0 * 3^0) +`(1 * 3^3) + (1 * 3^2) + (2 * 3^1) + (0 * 3^0)` I think you got the idea! -*Yes. Those three numbers above are exactly the same. Congratulations!* +_Yes. Those three numbers above are exactly the same. Congratulations!_ + +[positional-notation]: https://en.wikipedia.org/wiki/Positional_notation diff --git a/exercises/practice/all-your-base/.meta/config.json b/exercises/practice/all-your-base/.meta/config.json index f1939042..aca92230 100644 --- a/exercises/practice/all-your-base/.meta/config.json +++ b/exercises/practice/all-your-base/.meta/config.json @@ -19,6 +19,9 @@ ], "example": [ ".meta/src/Example.re" + ], + "editor": [ + "src/AllYourBase.rei" ] } } diff --git a/exercises/practice/allergies/.docs/instructions.md b/exercises/practice/allergies/.docs/instructions.md index b8bbd5a3..daf8cfde 100644 --- a/exercises/practice/allergies/.docs/instructions.md +++ b/exercises/practice/allergies/.docs/instructions.md @@ -2,20 +2,18 @@ Given a person's allergy score, determine whether or not they're allergic to a given item, and their full list of allergies. -An allergy test produces a single numeric score which contains the -information about all the allergies the person has (that they were -tested for). +An allergy test produces a single numeric score which contains the information about all the allergies the person has (that they were tested for). The list of items (and their value) that were tested are: -* eggs (1) -* peanuts (2) -* shellfish (4) -* strawberries (8) -* tomatoes (16) -* chocolate (32) -* pollen (64) -* cats (128) +- eggs (1) +- peanuts (2) +- shellfish (4) +- strawberries (8) +- tomatoes (16) +- chocolate (32) +- pollen (64) +- cats (128) So if Tom is allergic to peanuts and chocolate, he gets a score of 34. @@ -24,7 +22,6 @@ Now, given just that score of 34, your program should be able to say: - Whether Tom is allergic to any one of those allergens listed above. - All the allergens Tom is allergic to. -Note: a given score may include allergens **not** listed above (i.e. -allergens that score 256, 512, 1024, etc.). Your program should -ignore those components of the score. For example, if the allergy -score is 257, your program should only report the eggs (1) allergy. +Note: a given score may include allergens **not** listed above (i.e. allergens that score 256, 512, 1024, etc.). +Your program should ignore those components of the score. +For example, if the allergy score is 257, your program should only report the eggs (1) allergy. diff --git a/exercises/practice/allergies/.meta/config.json b/exercises/practice/allergies/.meta/config.json index 8e499fa6..56d2b758 100644 --- a/exercises/practice/allergies/.meta/config.json +++ b/exercises/practice/allergies/.meta/config.json @@ -19,8 +19,11 @@ ], "example": [ ".meta/src/Example.re" + ], + "editor": [ + "src/Allergies.rei" ] }, - "source": "Jumpstart Lab Warm-up", - "source_url": "http://jumpstartlab.com" + "source": "Exercise by the JumpstartLab team for students at The Turing School of Software and Design.", + "source_url": "https://turing.edu" } diff --git a/exercises/practice/anagram/.docs/instructions.md b/exercises/practice/anagram/.docs/instructions.md index 2675b583..7d1c8283 100644 --- a/exercises/practice/anagram/.docs/instructions.md +++ b/exercises/practice/anagram/.docs/instructions.md @@ -1,8 +1,13 @@ # Instructions -An anagram is a rearrangement of letters to form a new word. -Given a word and a list of candidates, select the sublist of anagrams of the given word. +An anagram is a rearrangement of letters to form a new word: for example `"owns"` is an anagram of `"snow"`. +A word is not its own anagram: for example, `"stop"` is not an anagram of `"stop"`. -Given `"listen"` and a list of candidates like `"enlists" "google" -"inlets" "banana"` the program should return a list containing -`"inlets"`. +Given a target word and a set of candidate words, this exercise requests the anagram set: the subset of the candidates that are anagrams of the target. + +The target and candidates are words of one or more ASCII alphabetic characters (`A`-`Z` and `a`-`z`). +Lowercase and uppercase characters are equivalent: for example, `"PoTS"` is an anagram of `"sTOp"`, but `StoP` is not an anagram of `sTOp`. +The anagram set is the subset of the candidate set that are anagrams of the target (in any order). +Words in the anagram set should have the same letter case as in the candidate set. + +Given the target `"stone"` and candidates `"stone"`, `"tones"`, `"banana"`, `"tons"`, `"notes"`, `"Seton"`, the anagram set is `"tones"`, `"notes"`, `"Seton"`. diff --git a/exercises/practice/anagram/.meta/config.json b/exercises/practice/anagram/.meta/config.json index 14095a2f..3381ce45 100644 --- a/exercises/practice/anagram/.meta/config.json +++ b/exercises/practice/anagram/.meta/config.json @@ -17,6 +17,9 @@ ], "example": [ ".meta/src/Example.re" + ], + "editor": [ + "src/Anagram.rei" ] }, "source": "Inspired by the Extreme Startup game", diff --git a/exercises/practice/armstrong-numbers/.docs/instructions.md b/exercises/practice/armstrong-numbers/.docs/instructions.md index 452a996f..5e56bbe4 100644 --- a/exercises/practice/armstrong-numbers/.docs/instructions.md +++ b/exercises/practice/armstrong-numbers/.docs/instructions.md @@ -1,12 +1,14 @@ # Instructions -An [Armstrong number](https://en.wikipedia.org/wiki/Narcissistic_number) is a number that is the sum of its own digits each raised to the power of the number of digits. +An [Armstrong number][armstrong-number] is a number that is the sum of its own digits each raised to the power of the number of digits. For example: - 9 is an Armstrong number, because `9 = 9^1 = 9` -- 10 is *not* an Armstrong number, because `10 != 1^2 + 0^2 = 1` +- 10 is _not_ an Armstrong number, because `10 != 1^2 + 0^2 = 1` - 153 is an Armstrong number, because: `153 = 1^3 + 5^3 + 3^3 = 1 + 125 + 27 = 153` -- 154 is *not* an Armstrong number, because: `154 != 1^3 + 5^3 + 4^3 = 1 + 125 + 64 = 190` +- 154 is _not_ an Armstrong number, because: `154 != 1^3 + 5^3 + 4^3 = 1 + 125 + 64 = 190` Write some code to determine whether a number is an Armstrong number. + +[armstrong-number]: https://en.wikipedia.org/wiki/Narcissistic_number diff --git a/exercises/practice/armstrong-numbers/.meta/config.json b/exercises/practice/armstrong-numbers/.meta/config.json index 5da82904..3f3ea8af 100644 --- a/exercises/practice/armstrong-numbers/.meta/config.json +++ b/exercises/practice/armstrong-numbers/.meta/config.json @@ -1,5 +1,5 @@ { - "blurb": "Determine if a number is an Armstrong number", + "blurb": "Determine if a number is an Armstrong number.", "authors": [ "tejasbubane" ], @@ -19,6 +19,9 @@ ], "example": [ ".meta/src/Example.re" + ], + "editor": [ + "src/ArmstrongNumbers.rei" ] }, "source": "Wikipedia", diff --git a/exercises/practice/binary-search/.docs/instructions.md b/exercises/practice/binary-search/.docs/instructions.md index aa1946cf..12f4358e 100644 --- a/exercises/practice/binary-search/.docs/instructions.md +++ b/exercises/practice/binary-search/.docs/instructions.md @@ -11,7 +11,7 @@ Binary search only works when a list has been sorted. The algorithm looks like this: -- Find the middle element of a *sorted* list and compare it with the item we're looking for. +- Find the middle element of a _sorted_ list and compare it with the item we're looking for. - If the middle element is our item, then we're done! - If the middle element is greater than our item, we can eliminate that element and all the elements **after** it. - If the middle element is less than our item, we can eliminate that element and all the elements **before** it. diff --git a/exercises/practice/binary-search/.meta/config.json b/exercises/practice/binary-search/.meta/config.json index cfd6693e..ab07dfa1 100644 --- a/exercises/practice/binary-search/.meta/config.json +++ b/exercises/practice/binary-search/.meta/config.json @@ -17,8 +17,11 @@ ], "example": [ ".meta/src/Example.re" + ], + "editor": [ + "src/BinarySearch.rei" ] }, "source": "Wikipedia", - "source_url": "http://en.wikipedia.org/wiki/Binary_search_algorithm" + "source_url": "https://en.wikipedia.org/wiki/Binary_search_algorithm" } diff --git a/exercises/practice/bob/.meta/config.json b/exercises/practice/bob/.meta/config.json index 0c2c8422..a729f551 100644 --- a/exercises/practice/bob/.meta/config.json +++ b/exercises/practice/bob/.meta/config.json @@ -19,8 +19,11 @@ ], "example": [ ".meta/src/Example.re" + ], + "editor": [ + "src/Bob.rei" ] }, "source": "Inspired by the 'Deaf Grandma' exercise in Chris Pine's Learn to Program tutorial.", - "source_url": "http://pine.fm/LearnToProgram/?Chapter=06" + "source_url": "https://pine.fm/LearnToProgram/?Chapter=06" } diff --git a/exercises/practice/change/.docs/instructions.md b/exercises/practice/change/.docs/instructions.md index 59f4f4f9..30fa5677 100644 --- a/exercises/practice/change/.docs/instructions.md +++ b/exercises/practice/change/.docs/instructions.md @@ -1,14 +1,11 @@ # Instructions -Correctly determine the fewest number of coins to be given to a customer such -that the sum of the coins' value would equal the correct amount of change. +Correctly determine the fewest number of coins to be given to a customer such that the sum of the coins' value would equal the correct amount of change. ## For example -- An input of 15 with [1, 5, 10, 25, 100] should return one nickel (5) - and one dime (10) or [5, 10] -- An input of 40 with [1, 5, 10, 25, 100] should return one nickel (5) - and one dime (10) and one quarter (25) or [5, 10, 25] +- An input of 15 with [1, 5, 10, 25, 100] should return one nickel (5) and one dime (10) or [5, 10] +- An input of 40 with [1, 5, 10, 25, 100] should return one nickel (5) and one dime (10) and one quarter (25) or [5, 10, 25] ## Edge cases diff --git a/exercises/practice/change/.meta/config.json b/exercises/practice/change/.meta/config.json index 881ae58b..aebae343 100644 --- a/exercises/practice/change/.meta/config.json +++ b/exercises/practice/change/.meta/config.json @@ -1,5 +1,5 @@ { - "blurb": "Correctly determine change to be given using the least number of coins", + "blurb": "Correctly determine change to be given using the least number of coins.", "authors": [ "stevejb71" ], @@ -18,6 +18,9 @@ ], "example": [ ".meta/src/Example.re" + ], + "editor": [ + "src/Change.rei" ] }, "source": "Software Craftsmanship - Coin Change Kata", diff --git a/exercises/practice/hello-world/.docs/instructions.md b/exercises/practice/hello-world/.docs/instructions.md index 6e08ebba..c9570e48 100644 --- a/exercises/practice/hello-world/.docs/instructions.md +++ b/exercises/practice/hello-world/.docs/instructions.md @@ -1,15 +1,16 @@ # Instructions -The classical introductory exercise. Just say "Hello, World!". +The classical introductory exercise. +Just say "Hello, World!". -["Hello, World!"](http://en.wikipedia.org/wiki/%22Hello,_world!%22_program) is -the traditional first program for beginning programming in a new language -or environment. +["Hello, World!"][hello-world] is the traditional first program for beginning programming in a new language or environment. The objectives are simple: -- Write a function that returns the string "Hello, World!". +- Modify the provided code so that it produces the string "Hello, World!". - Run the test suite and make sure that it succeeds. - Submit your solution and check it at the website. If everything goes well, you will be ready to fetch your first real exercise. + +[hello-world]: https://en.wikipedia.org/wiki/%22Hello,_world!%22_program diff --git a/exercises/practice/hello-world/.meta/config.json b/exercises/practice/hello-world/.meta/config.json index 76a562c6..64657630 100644 --- a/exercises/practice/hello-world/.meta/config.json +++ b/exercises/practice/hello-world/.meta/config.json @@ -1,5 +1,5 @@ { - "blurb": "The classical introductory exercise. Just say \"Hello, World!\"", + "blurb": "Exercism's classic introductory exercise. Just say \"Hello, World!\".", "authors": [ "tejasbubane" ], @@ -18,8 +18,11 @@ ], "example": [ ".meta/src/Example.re" + ], + "editor": [ + "src/HelloWorld.rei" ] }, "source": "This is an exercise to introduce users to using Exercism", - "source_url": "http://en.wikipedia.org/wiki/%22Hello,_world!%22_program" + "source_url": "https://en.wikipedia.org/wiki/%22Hello,_world!%22_program" } diff --git a/exercises/practice/isogram/.docs/instructions.md b/exercises/practice/isogram/.docs/instructions.md index 9cc5350b..2e8df851 100644 --- a/exercises/practice/isogram/.docs/instructions.md +++ b/exercises/practice/isogram/.docs/instructions.md @@ -2,7 +2,7 @@ Determine if a word or phrase is an isogram. -An isogram (also known as a "nonpattern word") is a word or phrase without a repeating letter, however spaces and hyphens are allowed to appear multiple times. +An isogram (also known as a "non-pattern word") is a word or phrase without a repeating letter, however spaces and hyphens are allowed to appear multiple times. Examples of isograms: @@ -11,4 +11,4 @@ Examples of isograms: - downstream - six-year-old -The word *isograms*, however, is not an isogram, because the s repeats. +The word _isograms_, however, is not an isogram, because the s repeats. diff --git a/exercises/practice/isogram/.meta/config.json b/exercises/practice/isogram/.meta/config.json index 489d5e93..6847b3aa 100644 --- a/exercises/practice/isogram/.meta/config.json +++ b/exercises/practice/isogram/.meta/config.json @@ -17,6 +17,9 @@ ], "example": [ ".meta/src/Example.re" + ], + "editor": [ + "src/Isogram.rei" ] }, "source": "Wikipedia", diff --git a/exercises/practice/leap/.docs/instructions.md b/exercises/practice/leap/.docs/instructions.md index dc7b4e81..a83826b2 100644 --- a/exercises/practice/leap/.docs/instructions.md +++ b/exercises/practice/leap/.docs/instructions.md @@ -10,15 +10,13 @@ on every year that is evenly divisible by 4 unless the year is also evenly divisible by 400 ``` -For example, 1997 is not a leap year, but 1996 is. 1900 is not a leap -year, but 2000 is. +For example, 1997 is not a leap year, but 1996 is. +1900 is not a leap year, but 2000 is. ## Notes -Though our exercise adopts some very simple rules, there is more to -learn! +Though our exercise adopts some very simple rules, there is more to learn! -For a delightful, four minute explanation of the whole leap year -phenomenon, go watch [this youtube video][video]. +For a delightful, four minute explanation of the whole leap year phenomenon, go watch [this youtube video][video]. -[video]: http://www.youtube.com/watch?v=xX96xng7sAE +[video]: https://www.youtube.com/watch?v=xX96xng7sAE diff --git a/exercises/practice/leap/.meta/config.json b/exercises/practice/leap/.meta/config.json index 750dd6e4..d1cbb9c9 100644 --- a/exercises/practice/leap/.meta/config.json +++ b/exercises/practice/leap/.meta/config.json @@ -17,8 +17,11 @@ ], "example": [ ".meta/src/Example.re" + ], + "editor": [ + "src/Leap.rei" ] }, - "source": "JavaRanch Cattle Drive, exercise 3", - "source_url": "http://www.javaranch.com/leap.jsp" + "source": "CodeRanch Cattle Drive, Assignment 3", + "source_url": "https://coderanch.com/t/718816/Leap" } diff --git a/exercises/practice/minesweeper/.docs/instructions.md b/exercises/practice/minesweeper/.docs/instructions.md index 1114cc95..f5f918bd 100644 --- a/exercises/practice/minesweeper/.docs/instructions.md +++ b/exercises/practice/minesweeper/.docs/instructions.md @@ -2,25 +2,20 @@ Add the mine counts to a completed Minesweeper board. -Minesweeper is a popular game where the user has to find the mines using -numeric hints that indicate how many mines are directly adjacent -(horizontally, vertically, diagonally) to a square. +Minesweeper is a popular game where the user has to find the mines using numeric hints that indicate how many mines are directly adjacent (horizontally, vertically, diagonally) to a square. -In this exercise you have to create some code that counts the number of -mines adjacent to a given empty square and replaces that square with the -count. +In this exercise you have to create some code that counts the number of mines adjacent to a given empty square and replaces that square with the count. -The board is a rectangle composed of blank space (' ') characters. A mine -is represented by an asterisk ('\*') character. +The board is a rectangle composed of blank space (' ') characters. +A mine is represented by an asterisk (`*`) character. If a given space has no adjacent mines at all, leave that square blank. ## Examples -For example you may receive a 5 x 4 board like this (empty spaces are -represented here with the '·' character for display on screen): +For example you may receive a 5 x 4 board like this (empty spaces are represented here with the '·' character for display on screen): -``` +```text ·*·*· ··*·· ··*·· @@ -29,7 +24,7 @@ represented here with the '·' character for display on screen): And your code will transform it into this: -``` +```text 1*3*1 13*31 ·2*2· diff --git a/exercises/practice/minesweeper/.meta/config.json b/exercises/practice/minesweeper/.meta/config.json index 1dc698fc..40071d79 100644 --- a/exercises/practice/minesweeper/.meta/config.json +++ b/exercises/practice/minesweeper/.meta/config.json @@ -1,5 +1,5 @@ { - "blurb": "Add the numbers to a minesweeper board", + "blurb": "Add the numbers to a minesweeper board.", "authors": [ "stevejb71" ], @@ -17,6 +17,9 @@ ], "example": [ ".meta/src/Example.re" + ], + "editor": [ + "src/Minesweeper.rei" ] } } diff --git a/exercises/practice/pangram/.docs/instructions.md b/exercises/practice/pangram/.docs/instructions.md index d5698bc2..817c872d 100644 --- a/exercises/practice/pangram/.docs/instructions.md +++ b/exercises/practice/pangram/.docs/instructions.md @@ -5,4 +5,4 @@ Your task is to figure out if a sentence is a pangram. A pangram is a sentence using every letter of the alphabet at least once. It is case insensitive, so it doesn't matter if a letter is lower-case (e.g. `k`) or upper-case (e.g. `K`). -For this exercise we only use the basic letters used in the English alphabet: `a` to `z`. +For this exercise, a sentence is a pangram if it contains each of the 26 letters in the English alphabet. diff --git a/exercises/practice/pangram/.meta/config.json b/exercises/practice/pangram/.meta/config.json index 26f76e68..a3d3bf7c 100644 --- a/exercises/practice/pangram/.meta/config.json +++ b/exercises/practice/pangram/.meta/config.json @@ -17,6 +17,9 @@ ], "example": [ ".meta/src/Example.re" + ], + "editor": [ + "src/Pangram.rei" ] }, "source": "Wikipedia", diff --git a/exercises/practice/phone-number/.docs/instructions.md b/exercises/practice/phone-number/.docs/instructions.md index 6e36daef..62ba48e9 100644 --- a/exercises/practice/phone-number/.docs/instructions.md +++ b/exercises/practice/phone-number/.docs/instructions.md @@ -2,21 +2,26 @@ Clean up user-entered phone numbers so that they can be sent SMS messages. -The **North American Numbering Plan (NANP)** is a telephone numbering system used by many countries in North America like the United States, Canada or Bermuda. All NANP-countries share the same international country code: `1`. +The **North American Numbering Plan (NANP)** is a telephone numbering system used by many countries in North America like the United States, Canada or Bermuda. +All NANP-countries share the same international country code: `1`. -NANP numbers are ten-digit numbers consisting of a three-digit Numbering Plan Area code, commonly known as *area code*, followed by a seven-digit local number. The first three digits of the local number represent the *exchange code*, followed by the unique four-digit number which is the *subscriber number*. +NANP numbers are ten-digit numbers consisting of a three-digit Numbering Plan Area code, commonly known as _area code_, followed by a seven-digit local number. +The first three digits of the local number represent the _exchange code_, followed by the unique four-digit number which is the _subscriber number_. The format is usually represented as ```text -(NXX)-NXX-XXXX +NXX NXX-XXXX ``` where `N` is any digit from 2 through 9 and `X` is any digit from 0 through 9. -Your task is to clean up differently formatted telephone numbers by removing punctuation and the country code (1) if present. +Sometimes they also have the country code (represented as `1` or `+1`) prefixed. + +Your task is to clean up differently formatted telephone numbers by removing punctuation and the country code if present. For example, the inputs + - `+1 (613)-995-0253` - `613-995-0253` - `1 613 995 0253` diff --git a/exercises/practice/phone-number/.meta/config.json b/exercises/practice/phone-number/.meta/config.json index 1530356d..5289d260 100644 --- a/exercises/practice/phone-number/.meta/config.json +++ b/exercises/practice/phone-number/.meta/config.json @@ -18,8 +18,11 @@ ], "example": [ ".meta/src/Example.re" + ], + "editor": [ + "src/PhoneNumber.rei" ] }, - "source": "Event Manager by JumpstartLab", - "source_url": "http://tutorials.jumpstartlab.com/projects/eventmanager.html" + "source": "Exercise by the JumpstartLab team for students at The Turing School of Software and Design.", + "source_url": "https://turing.edu" } diff --git a/exercises/practice/protein-translation/.docs/instructions.md b/exercises/practice/protein-translation/.docs/instructions.md index c211345e..7dc34d2e 100644 --- a/exercises/practice/protein-translation/.docs/instructions.md +++ b/exercises/practice/protein-translation/.docs/instructions.md @@ -11,7 +11,8 @@ Codons: `"AUG", "UUU", "UCU"` Protein: `"Methionine", "Phenylalanine", "Serine"` -There are 64 codons which in turn correspond to 20 amino acids; however, all of the codon sequences and resulting amino acids are not important in this exercise. If it works for one codon, the program should work for all of them. +There are 64 codons which in turn correspond to 20 amino acids; however, all of the codon sequences and resulting amino acids are not important in this exercise. +If it works for one codon, the program should work for all of them. However, feel free to expand the list in the test suite to include them all. There are also three terminating codons (also known as 'STOP' codons); if any of these codons are encountered (by the ribosome), all translation ends and the protein is terminated. @@ -28,15 +29,17 @@ Note the stop codon `"UAA"` terminates the translation and the final methionine Below are the codons and resulting Amino Acids needed for the exercise. -Codon | Protein -:--- | :--- -AUG | Methionine -UUU, UUC | Phenylalanine -UUA, UUG | Leucine -UCU, UCC, UCA, UCG | Serine -UAU, UAC | Tyrosine -UGU, UGC | Cysteine -UGG | Tryptophan -UAA, UAG, UGA | STOP - -Learn more about [protein translation on Wikipedia](http://en.wikipedia.org/wiki/Translation_(biology)) +| Codon | Protein | +| :----------------- | :------------ | +| AUG | Methionine | +| UUU, UUC | Phenylalanine | +| UUA, UUG | Leucine | +| UCU, UCC, UCA, UCG | Serine | +| UAU, UAC | Tyrosine | +| UGU, UGC | Cysteine | +| UGG | Tryptophan | +| UAA, UAG, UGA | STOP | + +Learn more about [protein translation on Wikipedia][protein-translation]. + +[protein-translation]: https://en.wikipedia.org/wiki/Translation_(biology) diff --git a/exercises/practice/protein-translation/.meta/config.json b/exercises/practice/protein-translation/.meta/config.json index 0632a647..d95a5599 100644 --- a/exercises/practice/protein-translation/.meta/config.json +++ b/exercises/practice/protein-translation/.meta/config.json @@ -18,6 +18,9 @@ ], "example": [ ".meta/src/Example.re" + ], + "editor": [ + "src/ProteinTranslation.rei" ] }, "source": "Tyler Long" diff --git a/exercises/practice/raindrops/.docs/instructions.md b/exercises/practice/raindrops/.docs/instructions.md index a78585df..fc61d36e 100644 --- a/exercises/practice/raindrops/.docs/instructions.md +++ b/exercises/practice/raindrops/.docs/instructions.md @@ -1,6 +1,8 @@ # Instructions -Your task is to convert a number into a string that contains raindrop sounds corresponding to certain potential factors. A factor is a number that evenly divides into another number, leaving no remainder. The simplest way to test if a one number is a factor of another is to use the [modulo operation](https://en.wikipedia.org/wiki/Modulo_operation). +Your task is to convert a number into a string that contains raindrop sounds corresponding to certain potential factors. +A factor is a number that evenly divides into another number, leaving no remainder. +The simplest way to test if one number is a factor of another is to use the [modulo operation][modulo]. The rules of `raindrops` are that if a given number: @@ -14,3 +16,5 @@ The rules of `raindrops` are that if a given number: - 28 has 7 as a factor, but not 3 or 5, so the result would be "Plong". - 30 has both 3 and 5 as factors, but not 7, so the result would be "PlingPlang". - 34 is not factored by 3, 5, or 7, so the result would be "34". + +[modulo]: https://en.wikipedia.org/wiki/Modulo_operation diff --git a/exercises/practice/raindrops/.meta/config.json b/exercises/practice/raindrops/.meta/config.json index 6465c718..c39f4f53 100644 --- a/exercises/practice/raindrops/.meta/config.json +++ b/exercises/practice/raindrops/.meta/config.json @@ -18,6 +18,9 @@ ], "example": [ ".meta/src/Example.re" + ], + "editor": [ + "src/Raindrops.rei" ] }, "source": "A variation on FizzBuzz, a famous technical interview question that is intended to weed out potential candidates. That question is itself derived from Fizz Buzz, a popular children's game for teaching division.", diff --git a/exercises/practice/resistor-color/.docs/instructions.md b/exercises/practice/resistor-color/.docs/instructions.md index dcdb38d7..646c1439 100644 --- a/exercises/practice/resistor-color/.docs/instructions.md +++ b/exercises/practice/resistor-color/.docs/instructions.md @@ -3,8 +3,8 @@ If you want to build something using a Raspberry Pi, you'll probably use _resistors_. For this exercise, you need to know two things about them: -* Each resistor has a resistance value. -* Resistors are small - so small in fact that if you printed the resistance value on them, it would be hard to read. +- Each resistor has a resistance value. +- Resistors are small - so small in fact that if you printed the resistance value on them, it would be hard to read. To get around this problem, manufacturers print color-coded bands onto the resistors to denote their resistance values. Each band has a position and a numeric value. @@ -27,9 +27,13 @@ These colors are encoded as follows: - White: 9 The goal of this exercise is to create a way: + - to look up the numerical value associated with a particular color band - to list the different band colors -Mnemonics map the colors to the numbers, that, when stored as an array, happen to map to their index in the array: Better Be Right Or Your Great Big Values Go Wrong. +Mnemonics map the colors to the numbers, that, when stored as an array, happen to map to their index in the array: +Better Be Right Or Your Great Big Values Go Wrong. + +More information on the color encoding of resistors can be found in the [Electronic color code Wikipedia article][e-color-code]. -More information on the color encoding of resistors can be found in the [Electronic color code Wikipedia article](https://en.wikipedia.org/wiki/Electronic_color_code) +[e-color-code]: https://en.wikipedia.org/wiki/Electronic_color_code diff --git a/exercises/practice/resistor-color/.meta/config.json b/exercises/practice/resistor-color/.meta/config.json index e883caeb..76311939 100644 --- a/exercises/practice/resistor-color/.meta/config.json +++ b/exercises/practice/resistor-color/.meta/config.json @@ -1,5 +1,5 @@ { - "blurb": "Convert a resistor band's color to its numeric representation", + "blurb": "Convert a resistor band's color to its numeric representation.", "authors": [ "tejasbubane" ], @@ -12,6 +12,9 @@ ], "example": [ ".meta/src/Example.re" + ], + "editor": [ + "src/ResistorColor.rei" ] }, "source": "Maud de Vries, Erik Schierboom", diff --git a/exercises/practice/rna-transcription/.meta/config.json b/exercises/practice/rna-transcription/.meta/config.json index f8b41f6d..5762b9f4 100644 --- a/exercises/practice/rna-transcription/.meta/config.json +++ b/exercises/practice/rna-transcription/.meta/config.json @@ -17,8 +17,11 @@ ], "example": [ ".meta/src/Example.re" + ], + "editor": [ + "src/RnaTranscription.rei" ] }, "source": "Hyperphysics", - "source_url": "http://hyperphysics.phy-astr.gsu.edu/hbase/Organic/transcription.html" + "source_url": "https://web.archive.org/web/20220408112140/http://hyperphysics.phy-astr.gsu.edu/hbase/Organic/transcription.html" } diff --git a/exercises/practice/roman-numerals/.docs/instructions.md b/exercises/practice/roman-numerals/.docs/instructions.md index ce25f205..247ea089 100644 --- a/exercises/practice/roman-numerals/.docs/instructions.md +++ b/exercises/practice/roman-numerals/.docs/instructions.md @@ -2,17 +2,15 @@ Write a function to convert from normal numbers to Roman Numerals. -The Romans were a clever bunch. They conquered most of Europe and ruled -it for hundreds of years. They invented concrete and straight roads and -even bikinis. One thing they never discovered though was the number -zero. This made writing and dating extensive histories of their exploits -slightly more challenging, but the system of numbers they came up with -is still in use today. For example the BBC uses Roman numerals to date -their programmes. - -The Romans wrote numbers using letters - I, V, X, L, C, D, M. (notice -these letters have lots of straight lines and are hence easy to hack -into stone tablets). +The Romans were a clever bunch. +They conquered most of Europe and ruled it for hundreds of years. +They invented concrete and straight roads and even bikinis. +One thing they never discovered though was the number zero. +This made writing and dating extensive histories of their exploits slightly more challenging, but the system of numbers they came up with is still in use today. +For example the BBC uses Roman numerals to date their programs. + +The Romans wrote numbers using letters - I, V, X, L, C, D, M. +(notice these letters have lots of straight lines and are hence easy to hack into stone tablets). ```text 1 => I @@ -20,12 +18,10 @@ into stone tablets). 7 => VII ``` -There is no need to be able to convert numbers larger than about 3000. +The maximum number supported by this notation is 3,999. (The Romans themselves didn't tend to go any higher) -Wikipedia says: Modern Roman numerals ... are written by expressing each -digit separately starting with the left most digit and skipping any -digit with a value of zero. +Wikipedia says: Modern Roman numerals ... are written by expressing each digit separately starting with the left most digit and skipping any digit with a value of zero. To see this in practice, consider the example of 1990. @@ -40,4 +36,6 @@ In Roman numerals 1990 is MCMXC: 2000=MM 8=VIII -See also: http://www.novaroma.org/via_romana/numbers.html +Learn more about [Roman numerals on Wikipedia][roman-numerals]. + +[roman-numerals]: https://wiki.imperivm-romanvm.com/wiki/Roman_Numerals diff --git a/exercises/practice/roman-numerals/.meta/config.json b/exercises/practice/roman-numerals/.meta/config.json index 526a6007..49854445 100644 --- a/exercises/practice/roman-numerals/.meta/config.json +++ b/exercises/practice/roman-numerals/.meta/config.json @@ -17,8 +17,11 @@ ], "example": [ ".meta/src/Example.re" + ], + "editor": [ + "src/RomanNumerals.rei" ] }, "source": "The Roman Numeral Kata", - "source_url": "http://codingdojo.org/cgi-bin/index.pl?KataRomanNumerals" + "source_url": "https://codingdojo.org/kata/RomanNumerals/" } diff --git a/exercises/practice/run-length-encoding/.docs/instructions.md b/exercises/practice/run-length-encoding/.docs/instructions.md index 95f7a9d6..fc8ce056 100644 --- a/exercises/practice/run-length-encoding/.docs/instructions.md +++ b/exercises/practice/run-length-encoding/.docs/instructions.md @@ -2,8 +2,7 @@ Implement run-length encoding and decoding. -Run-length encoding (RLE) is a simple form of data compression, where runs -(consecutive data elements) are replaced by just one data value and count. +Run-length encoding (RLE) is a simple form of data compression, where runs (consecutive data elements) are replaced by just one data value and count. For example we can represent the original 53 characters with only 13. @@ -11,14 +10,11 @@ For example we can represent the original 53 characters with only 13. "WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB" -> "12WB12W3B24WB" ``` -RLE allows the original data to be perfectly reconstructed from -the compressed data, which makes it a lossless data compression. +RLE allows the original data to be perfectly reconstructed from the compressed data, which makes it a lossless data compression. ```text "AABCCCDEEEE" -> "2AB3CD4E" -> "AABCCCDEEEE" ``` -For simplicity, you can assume that the unencoded string will only contain -the letters A through Z (either lower or upper case) and whitespace. This way -data to be encoded will never contain any numbers and numbers inside data to -be decoded always represent the count for the following character. +For simplicity, you can assume that the unencoded string will only contain the letters A through Z (either lower or upper case) and whitespace. +This way data to be encoded will never contain any numbers and numbers inside data to be decoded always represent the count for the following character. diff --git a/exercises/practice/run-length-encoding/.meta/config.json b/exercises/practice/run-length-encoding/.meta/config.json index c1ceb8ca..8cd02d2d 100644 --- a/exercises/practice/run-length-encoding/.meta/config.json +++ b/exercises/practice/run-length-encoding/.meta/config.json @@ -17,6 +17,9 @@ ], "example": [ ".meta/src/Example.re" + ], + "editor": [ + "src/RunLengthEncoding.rei" ] }, "source": "Wikipedia", diff --git a/exercises/practice/scrabble-score/.meta/config.json b/exercises/practice/scrabble-score/.meta/config.json index c0705364..b90d616d 100644 --- a/exercises/practice/scrabble-score/.meta/config.json +++ b/exercises/practice/scrabble-score/.meta/config.json @@ -1,5 +1,7 @@ { - "authors": ["meatball133"], + "authors": [ + "meatball133" + ], "files": { "solution": [ "src/ScrabbleScore.re" @@ -9,6 +11,9 @@ ], "example": [ ".meta/src/Example.re" + ], + "editor": [ + "src/ScrabbleScore.rei" ] }, "blurb": "Given a word, compute the Scrabble score for that word.", diff --git a/exercises/practice/space-age/.docs/instructions.md b/exercises/practice/space-age/.docs/instructions.md index 19cca8bf..fe938cc0 100644 --- a/exercises/practice/space-age/.docs/instructions.md +++ b/exercises/practice/space-age/.docs/instructions.md @@ -2,17 +2,24 @@ Given an age in seconds, calculate how old someone would be on: - - Mercury: orbital period 0.2408467 Earth years - - Venus: orbital period 0.61519726 Earth years - - Earth: orbital period 1.0 Earth years, 365.25 Earth days, or 31557600 seconds - - Mars: orbital period 1.8808158 Earth years - - Jupiter: orbital period 11.862615 Earth years - - Saturn: orbital period 29.447498 Earth years - - Uranus: orbital period 84.016846 Earth years - - Neptune: orbital period 164.79132 Earth years +- Mercury: orbital period 0.2408467 Earth years +- Venus: orbital period 0.61519726 Earth years +- Earth: orbital period 1.0 Earth years, 365.25 Earth days, or 31557600 seconds +- Mars: orbital period 1.8808158 Earth years +- Jupiter: orbital period 11.862615 Earth years +- Saturn: orbital period 29.447498 Earth years +- Uranus: orbital period 84.016846 Earth years +- Neptune: orbital period 164.79132 Earth years So if you were told someone were 1,000,000,000 seconds old, you should be able to say that they're 31.69 Earth-years old. -If you're wondering why Pluto didn't make the cut, go watch [this -youtube video](http://www.youtube.com/watch?v=Z_2gbGXzFbs). +If you're wondering why Pluto didn't make the cut, go watch [this YouTube video][pluto-video]. + +Note: The actual length of one complete orbit of the Earth around the sun is closer to 365.256 days (1 sidereal year). +The Gregorian calendar has, on average, 365.2425 days. +While not entirely accurate, 365.25 is the value used in this exercise. +See [Year on Wikipedia][year] for more ways to measure a year. + +[pluto-video]: https://www.youtube.com/watch?v=Z_2gbGXzFbs +[year]: https://en.wikipedia.org/wiki/Year#Summary diff --git a/exercises/practice/space-age/.meta/config.json b/exercises/practice/space-age/.meta/config.json index 045a169b..35543974 100644 --- a/exercises/practice/space-age/.meta/config.json +++ b/exercises/practice/space-age/.meta/config.json @@ -18,8 +18,11 @@ ], "example": [ ".meta/src/Example.re" + ], + "editor": [ + "src/SpaceAge.rei" ] }, "source": "Partially inspired by Chapter 1 in Chris Pine's online Learn to Program tutorial.", - "source_url": "http://pine.fm/LearnToProgram/?Chapter=01" + "source_url": "https://pine.fm/LearnToProgram/?Chapter=01" } diff --git a/exercises/practice/triangle/.meta/config.json b/exercises/practice/triangle/.meta/config.json index 6d794167..bdcbadaf 100644 --- a/exercises/practice/triangle/.meta/config.json +++ b/exercises/practice/triangle/.meta/config.json @@ -1,5 +1,7 @@ { - "authors": ["bethanyg"], + "authors": [ + "bethanyg" + ], "files": { "solution": [ "src/Triangle.re" @@ -9,6 +11,9 @@ ], "example": [ ".meta/src/Example.re" + ], + "editor": [ + "src/Triangle.rei" ] }, "blurb": "Determine if a triangle is equilateral, isosceles, or scalene.", diff --git a/exercises/practice/two-fer/.docs/instructions.md b/exercises/practice/two-fer/.docs/instructions.md index a9bb4a3c..37aa7529 100644 --- a/exercises/practice/two-fer/.docs/instructions.md +++ b/exercises/practice/two-fer/.docs/instructions.md @@ -17,9 +17,9 @@ 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. +| 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/practice/two-fer/.meta/config.json b/exercises/practice/two-fer/.meta/config.json index 7e247271..526c6b76 100644 --- a/exercises/practice/two-fer/.meta/config.json +++ b/exercises/practice/two-fer/.meta/config.json @@ -1,5 +1,5 @@ { - "blurb": "Create a sentence of the form \"One for X, one for me.\"", + "blurb": "Create a sentence of the form \"One for X, one for me.\".", "authors": [ "tejasbubane" ], @@ -12,6 +12,9 @@ ], "example": [ ".meta/src/Example.re" + ], + "editor": [ + "src/TwoFer.rei" ] }, "source_url": "https://github.com/exercism/problem-specifications/issues/757" diff --git a/exercises/practice/word-count/.meta/config.json b/exercises/practice/word-count/.meta/config.json index e81a62bc..3acdaa06 100644 --- a/exercises/practice/word-count/.meta/config.json +++ b/exercises/practice/word-count/.meta/config.json @@ -19,6 +19,9 @@ ], "example": [ ".meta/src/Example.re" + ], + "editor": [ + "src/WordCount.rei" ] }, "source": "This is a classic toy problem, but we were reminded of it by seeing it in the Go Tour."