From 73c4f7257fbf9da3e71fd444adb130a95d332292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20B=20Nagy?= <20251272+BNAndras@users.noreply.github.com> Date: Thu, 15 Aug 2024 21:44:52 -0700 Subject: [PATCH] Configlet sync and format (#800) --- exercises/concept/basics/.meta/config.json | 10 +++--- .../practice/accumulate/.meta/config.json | 2 +- .../practice/acronym/.approaches/config.json | 13 +++++--- exercises/practice/acronym/.meta/config.json | 2 +- .../practice/all-your-base/.meta/config.json | 4 +-- .../practice/allergies/.meta/config.json | 2 +- .../alphametics/.docs/instructions.md | 4 +-- .../practice/alphametics/.meta/config.json | 4 +-- exercises/practice/anagram/.meta/config.json | 2 +- .../armstrong-numbers/.approaches/config.json | 17 +++++++--- .../armstrong-numbers/.meta/config.json | 2 +- .../practice/atbash-cipher/.meta/config.json | 2 +- .../bank-account/.docs/instructions.md | 2 +- .../practice/bank-account/.meta/config.json | 4 +-- .../practice/beer-song/.meta/config.json | 2 +- .../binary-search-tree/.meta/config.json | 2 +- .../practice/binary-search/.meta/config.json | 2 +- .../practice/bob/.approaches/config.json | 17 +++++++--- exercises/practice/bob/.meta/config.json | 2 +- .../practice/book-store/.meta/config.json | 2 +- exercises/practice/bowling/.meta/config.json | 2 +- exercises/practice/change/.meta/config.json | 2 +- .../circular-buffer/.meta/config.json | 3 ++ exercises/practice/clock/.meta/config.json | 2 +- .../.approaches/config.json | 13 +++++--- .../collatz-conjecture/.meta/config.json | 2 +- .../complex-numbers/.meta/config.json | 2 +- exercises/practice/connect/.meta/config.json | 4 +-- .../practice/crypto-square/.meta/config.json | 2 +- .../practice/custom-set/.meta/config.json | 4 +-- .../practice/darts/.docs/instructions.md | 4 +-- exercises/practice/darts/.meta/config.json | 2 +- exercises/practice/diamond/.meta/config.json | 2 +- .../difference-of-squares/.meta/config.json | 2 +- exercises/practice/dominoes/.meta/config.json | 4 +-- exercises/practice/etl/.meta/config.json | 2 +- .../flatten-array/.docs/instructions.md | 2 +- .../practice/flatten-array/.meta/config.json | 2 +- .../food-chain/.approaches/config.json | 9 ++++-- .../practice/food-chain/.meta/config.json | 2 +- exercises/practice/forth/.meta/config.json | 4 +-- .../practice/gigasecond/.meta/config.json | 2 +- .../practice/grade-school/.meta/config.json | 2 +- exercises/practice/grains/.meta/config.json | 2 +- .../practice/hamming/.approaches/config.json | 17 +++++++--- .../practice/hamming/.docs/instructions.md | 10 +++--- exercises/practice/hamming/.meta/config.json | 2 +- .../practice/hello-world/.meta/config.json | 2 +- .../practice/high-scores/.meta/config.json | 2 +- exercises/practice/house/.meta/config.json | 2 +- exercises/practice/isogram/.meta/config.json | 2 +- .../kindergarten-garden/.meta/config.json | 2 +- .../largest-series-product/.meta/config.json | 2 +- .../practice/leap/.approaches/config.json | 25 ++++++++++----- exercises/practice/leap/.meta/config.json | 2 +- .../practice/lens-person/.meta/config.json | 4 +-- .../practice/linked-list/.meta/config.json | 2 +- .../practice/luhn/.approaches/config.json | 21 +++++++++---- exercises/practice/luhn/.docs/instructions.md | 3 +- exercises/practice/luhn/.meta/config.json | 2 +- .../matching-brackets/.approaches/config.json | 13 +++++--- .../matching-brackets/.docs/instructions.md | 3 +- .../matching-brackets/.docs/introduction.md | 8 +++++ .../matching-brackets/.meta/config.json | 2 +- exercises/practice/matrix/.meta/config.json | 2 +- exercises/practice/meetup/.meta/config.json | 2 +- .../practice/minesweeper/.meta/config.json | 4 +-- .../practice/nth-prime/.meta/config.json | 2 +- .../nucleotide-count/.approaches/config.json | 17 +++++++--- .../nucleotide-count/.meta/config.json | 2 +- .../practice/ocr-numbers/.meta/config.json | 2 +- .../palindrome-products/.meta/config.json | 2 +- exercises/practice/pangram/.meta/config.json | 2 +- .../.docs/instructions.md | 2 +- .../.meta/config.json | 4 +-- .../pascals-triangle/.docs/instructions.md | 27 ++++++++++++++-- .../pascals-triangle/.docs/introduction.md | 22 +++++++++++++ .../pascals-triangle/.meta/config.json | 2 +- .../perfect-numbers/.meta/config.json | 2 +- .../phone-number/.approaches/config.json | 19 ++++++++---- .../practice/phone-number/.meta/config.json | 2 +- .../pig-latin/.approaches/config.json | 9 ++++-- .../practice/pig-latin/.docs/instructions.md | 4 +-- .../practice/pig-latin/.meta/config.json | 2 +- .../practice/prime-factors/.meta/config.json | 2 +- .../.approaches/config.json | 13 +++++--- .../protein-translation/.meta/config.json | 2 +- .../pythagorean-triplet/.meta/config.json | 2 +- .../practice/queen-attack/.meta/config.json | 2 +- .../rail-fence-cipher/.meta/config.json | 2 +- .../raindrops/.approaches/config.json | 13 +++++--- .../practice/raindrops/.meta/config.json | 2 +- .../practice/reverse-string/.meta/config.json | 3 ++ .../rna-transcription/.meta/config.json | 2 +- .../robot-name/.approaches/config.json | 13 +++++--- .../practice/robot-name/.meta/config.json | 2 +- .../robot-simulator/.approaches/config.json | 13 +++++--- .../robot-simulator/.meta/config.json | 2 +- .../roman-numerals/.approaches/config.json | 17 +++++++--- .../practice/roman-numerals/.meta/config.json | 2 +- .../rotational-cipher/.meta/config.json | 2 +- .../run-length-encoding/.meta/config.json | 2 +- .../practice/saddle-points/.meta/config.json | 2 +- exercises/practice/say/.docs/instructions.md | 2 -- exercises/practice/say/.meta/config.json | 2 +- .../scrabble-score/.approaches/config.json | 13 +++++--- .../practice/scrabble-score/.meta/config.json | 2 +- .../secret-handshake/.approaches/config.json | 13 +++++--- .../secret-handshake/.meta/config.json | 2 +- exercises/practice/series/.meta/config.json | 2 +- .../practice/sgf-parsing/.meta/config.json | 4 +-- exercises/practice/sieve/.meta/config.json | 2 +- .../practice/simple-cipher/.meta/config.json | 2 +- .../simple-linked-list/.meta/config.json | 2 +- .../space-age/.approaches/config.json | 17 +++++++--- .../practice/space-age/.docs/instructions.md | 31 ++++++++++--------- .../practice/space-age/.docs/introduction.md | 20 ++++++++++++ .../practice/space-age/.meta/config.json | 2 +- .../practice/spiral-matrix/.meta/config.json | 2 +- exercises/practice/strain/.meta/config.json | 2 +- exercises/practice/sublist/.meta/config.json | 4 +-- .../sum-of-multiples/.meta/config.json | 2 +- exercises/practice/triangle/.meta/config.json | 2 +- exercises/practice/two-fer/.meta/config.json | 2 +- .../.meta/config.json | 2 +- .../practice/word-count/.meta/config.json | 2 +- exercises/practice/wordy/.meta/config.json | 2 +- exercises/practice/yacht/.meta/config.json | 2 +- .../zebra-puzzle/.docs/instructions.md | 18 +++++------ .../zebra-puzzle/.docs/introduction.md | 2 +- .../practice/zebra-puzzle/.meta/config.json | 2 +- exercises/practice/zipper/.meta/config.json | 4 +-- 132 files changed, 445 insertions(+), 247 deletions(-) create mode 100644 exercises/practice/matching-brackets/.docs/introduction.md create mode 100644 exercises/practice/pascals-triangle/.docs/introduction.md create mode 100644 exercises/practice/space-age/.docs/introduction.md diff --git a/exercises/concept/basics/.meta/config.json b/exercises/concept/basics/.meta/config.json index f32cb2de..8ae1bdcc 100644 --- a/exercises/concept/basics/.meta/config.json +++ b/exercises/concept/basics/.meta/config.json @@ -1,11 +1,7 @@ { - "blurb": "TODO: add blurb for basics exercise", "authors": [ "stillleben" ], - "forked_from": [ - "csharp/lucians-luscious-lasagna" - ], "files": { "solution": [ "src/main/scala/Lasagna.scala" @@ -19,5 +15,9 @@ "invalidator": [ "build.sbt" ] - } + }, + "forked_from": [ + "csharp/lucians-luscious-lasagna" + ], + "blurb": "TODO: add blurb for basics exercise" } diff --git a/exercises/practice/accumulate/.meta/config.json b/exercises/practice/accumulate/.meta/config.json index b254742c..d6f193bd 100644 --- a/exercises/practice/accumulate/.meta/config.json +++ b/exercises/practice/accumulate/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "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.", "authors": [ "ricemery" ], @@ -23,6 +22,7 @@ "build.sbt" ] }, + "blurb": "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.", "source": "Conversation with James Edward Gray II", "source_url": "http://graysoftinc.com/" } diff --git a/exercises/practice/acronym/.approaches/config.json b/exercises/practice/acronym/.approaches/config.json index 1823fc98..a3869076 100644 --- a/exercises/practice/acronym/.approaches/config.json +++ b/exercises/practice/acronym/.approaches/config.json @@ -1,7 +1,8 @@ { "introduction": { - "authors": ["bobahop"], - "contributors": [] + "authors": [ + "bobahop" + ] }, "approaches": [ { @@ -9,14 +10,18 @@ "slug": "split", "title": "split", "blurb": "Use split to get the words.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] }, { "uuid": "986e4b72-1a7a-4684-9dd1-280537d285c8", "slug": "findallin", "title": "findAllIn", "blurb": "Use findAllIn to get the words.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] } ] } diff --git a/exercises/practice/acronym/.meta/config.json b/exercises/practice/acronym/.meta/config.json index d741c3a7..9f1cfbac 100644 --- a/exercises/practice/acronym/.meta/config.json +++ b/exercises/practice/acronym/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Convert a long phrase to its acronym.", "authors": [ "ricemery" ], @@ -23,6 +22,7 @@ "build.sbt" ] }, + "blurb": "Convert a long phrase to its acronym.", "source": "Julien Vanier", "source_url": "https://github.com/monkbroc" } diff --git a/exercises/practice/all-your-base/.meta/config.json b/exercises/practice/all-your-base/.meta/config.json index a86b77e5..9ce4a086 100644 --- a/exercises/practice/all-your-base/.meta/config.json +++ b/exercises/practice/all-your-base/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Convert a number, represented as a sequence of digits in one base, to any other base.", "authors": [ "ricemery" ], @@ -22,5 +21,6 @@ "invalidator": [ "build.sbt" ] - } + }, + "blurb": "Convert a number, represented as a sequence of digits in one base, to any other base." } diff --git a/exercises/practice/allergies/.meta/config.json b/exercises/practice/allergies/.meta/config.json index a5336cc2..74a4172f 100644 --- a/exercises/practice/allergies/.meta/config.json +++ b/exercises/practice/allergies/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Given a person's allergy score, determine whether or not they're allergic to a given item, and their full list of allergies.", "authors": [ "ricemery" ], @@ -22,6 +21,7 @@ "build.sbt" ] }, + "blurb": "Given a person's allergy score, determine whether or not they're allergic to a given item, and their full list of allergies.", "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/alphametics/.docs/instructions.md b/exercises/practice/alphametics/.docs/instructions.md index 649576ec..ef2cbb4a 100644 --- a/exercises/practice/alphametics/.docs/instructions.md +++ b/exercises/practice/alphametics/.docs/instructions.md @@ -1,6 +1,6 @@ # Instructions -Write a function to solve alphametics puzzles. +Given an alphametics puzzle, find the correct solution. [Alphametics][alphametics] is a puzzle where letters in words are replaced with numbers. @@ -26,6 +26,4 @@ This is correct because every letter is replaced by a different number and the w Each letter must represent a different digit, and the leading digit of a multi-digit number must not be zero. -Write a function to solve alphametics puzzles. - [alphametics]: https://en.wikipedia.org/wiki/Alphametics diff --git a/exercises/practice/alphametics/.meta/config.json b/exercises/practice/alphametics/.meta/config.json index 70b18de0..182598ac 100644 --- a/exercises/practice/alphametics/.meta/config.json +++ b/exercises/practice/alphametics/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Write a function to solve alphametics puzzles.", "authors": [ "abo64" ], @@ -22,5 +21,6 @@ "invalidator": [ "build.sbt" ] - } + }, + "blurb": "Given an alphametics puzzle, find the correct solution." } diff --git a/exercises/practice/anagram/.meta/config.json b/exercises/practice/anagram/.meta/config.json index 0cfa59e4..44b44dee 100644 --- a/exercises/practice/anagram/.meta/config.json +++ b/exercises/practice/anagram/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Given a word and a list of possible anagrams, select the correct sublist.", "authors": [ "sgrif" ], @@ -24,6 +23,7 @@ "build.sbt" ] }, + "blurb": "Given a word and a list of possible anagrams, select the correct sublist.", "source": "Inspired by the Extreme Startup game", "source_url": "https://github.com/rchatley/extreme_startup" } diff --git a/exercises/practice/armstrong-numbers/.approaches/config.json b/exercises/practice/armstrong-numbers/.approaches/config.json index 1b0348a6..ad634a38 100644 --- a/exercises/practice/armstrong-numbers/.approaches/config.json +++ b/exercises/practice/armstrong-numbers/.approaches/config.json @@ -1,7 +1,8 @@ { "introduction": { - "authors": ["bobahop"], - "contributors": [] + "authors": [ + "bobahop" + ] }, "approaches": [ { @@ -9,21 +10,27 @@ "slug": "tostring-map-sum", "title": "toString with map and sum", "blurb": "Use toString with map and sum to return the answer.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] }, { "uuid": "6efcd9c6-cf20-4b01-af87-938b5afbe81b", "slug": "iterate-takewhile-last", "title": "iterate with takeWhile and last", "blurb": "Use iterate with takeWhile and last to return the answer.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] }, { "uuid": "70ebcc42-e087-4724-a28e-26fa26a6e3ac", "slug": "recursion", "title": "Recursion", "blurb": "Use recursion to return the answer.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] } ] } diff --git a/exercises/practice/armstrong-numbers/.meta/config.json b/exercises/practice/armstrong-numbers/.meta/config.json index 5dd405b4..9a695854 100644 --- a/exercises/practice/armstrong-numbers/.meta/config.json +++ b/exercises/practice/armstrong-numbers/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Determine if a number is an Armstrong number.", "authors": [ "ricemery" ], @@ -22,6 +21,7 @@ "build.sbt" ] }, + "blurb": "Determine if a number is an Armstrong number.", "source": "Wikipedia", "source_url": "https://en.wikipedia.org/wiki/Narcissistic_number" } diff --git a/exercises/practice/atbash-cipher/.meta/config.json b/exercises/practice/atbash-cipher/.meta/config.json index af73d4f6..95d340fe 100644 --- a/exercises/practice/atbash-cipher/.meta/config.json +++ b/exercises/practice/atbash-cipher/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Create an implementation of the atbash cipher, an ancient encryption system created in the Middle East.", "authors": [ "ricemery" ], @@ -22,6 +21,7 @@ "build.sbt" ] }, + "blurb": "Create an implementation of the atbash cipher, an ancient encryption system created in the Middle East.", "source": "Wikipedia", "source_url": "https://en.wikipedia.org/wiki/Atbash" } diff --git a/exercises/practice/bank-account/.docs/instructions.md b/exercises/practice/bank-account/.docs/instructions.md index 0955520b..7398fbea 100644 --- a/exercises/practice/bank-account/.docs/instructions.md +++ b/exercises/practice/bank-account/.docs/instructions.md @@ -3,7 +3,7 @@ Your task is to implement bank accounts supporting opening/closing, withdrawals, and deposits of money. As bank accounts can be accessed in many different ways (internet, mobile phones, automatic charges), your bank software must allow accounts to be safely accessed from multiple threads/processes (terminology depends on your programming language) in parallel. -For example, there may be many deposits and withdrawals occurring in parallel; you need to ensure there is no [race conditions][wikipedia] between when you read the account balance and set the new balance. +For example, there may be many deposits and withdrawals occurring in parallel; you need to ensure there are no [race conditions][wikipedia] between when you read the account balance and set the new balance. It should be possible to close an account; operations against a closed account must fail. diff --git a/exercises/practice/bank-account/.meta/config.json b/exercises/practice/bank-account/.meta/config.json index 4757fefb..dc400f0e 100644 --- a/exercises/practice/bank-account/.meta/config.json +++ b/exercises/practice/bank-account/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Simulate a bank account supporting opening/closing, withdraws, and deposits of money. Watch out for concurrent transactions!", "authors": [ "ricemery" ], @@ -24,5 +23,6 @@ "invalidator": [ "build.sbt" ] - } + }, + "blurb": "Simulate a bank account supporting opening/closing, withdraws, and deposits of money. Watch out for concurrent transactions!" } diff --git a/exercises/practice/beer-song/.meta/config.json b/exercises/practice/beer-song/.meta/config.json index 701432a5..ee63b9cd 100644 --- a/exercises/practice/beer-song/.meta/config.json +++ b/exercises/practice/beer-song/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Produce the lyrics to that beloved classic, that field-trip favorite: 99 Bottles of Beer on the Wall.", "authors": [ "matteobaglini" ], @@ -23,6 +22,7 @@ "build.sbt" ] }, + "blurb": "Produce the lyrics to that beloved classic, that field-trip favorite: 99 Bottles of Beer on the Wall.", "source": "Learn to Program by Chris Pine", "source_url": "https://pine.fm/LearnToProgram/?Chapter=06" } diff --git a/exercises/practice/binary-search-tree/.meta/config.json b/exercises/practice/binary-search-tree/.meta/config.json index 2f50e068..ee7b263c 100644 --- a/exercises/practice/binary-search-tree/.meta/config.json +++ b/exercises/practice/binary-search-tree/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Insert and search for numbers in a binary tree.", "authors": [ "ricemery" ], @@ -22,5 +21,6 @@ "build.sbt" ] }, + "blurb": "Insert and search for numbers in a binary tree.", "source": "Josh Cheek" } diff --git a/exercises/practice/binary-search/.meta/config.json b/exercises/practice/binary-search/.meta/config.json index e1734cf6..adef357d 100644 --- a/exercises/practice/binary-search/.meta/config.json +++ b/exercises/practice/binary-search/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Implement a binary search algorithm.", "authors": [ "ricemery" ], @@ -22,6 +21,7 @@ "build.sbt" ] }, + "blurb": "Implement a binary search algorithm.", "source": "Wikipedia", "source_url": "https://en.wikipedia.org/wiki/Binary_search_algorithm" } diff --git a/exercises/practice/bob/.approaches/config.json b/exercises/practice/bob/.approaches/config.json index 45f89185..cb22d78e 100644 --- a/exercises/practice/bob/.approaches/config.json +++ b/exercises/practice/bob/.approaches/config.json @@ -1,7 +1,8 @@ { "introduction": { - "authors": ["bobahop"], - "contributors": [] + "authors": [ + "bobahop" + ] }, "approaches": [ { @@ -9,21 +10,27 @@ "slug": "if-expressions", "title": "if expressions", "blurb": "Use if expressions to return the answer.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] }, { "uuid": "80ad0f5d-9cb7-40aa-b453-d7b36cc6c06e", "slug": "match-expression", "title": "match expression", "blurb": "Use a match expression to return the answer.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] }, { "uuid": "6334f482-f75b-4cca-bade-a182fd585c72", "slug": "answers-vector", "title": "Answers Vector", "blurb": "Index into a Vector to return the answer.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] } ] } diff --git a/exercises/practice/bob/.meta/config.json b/exercises/practice/bob/.meta/config.json index 8dd47e1d..68196a9e 100644 --- a/exercises/practice/bob/.meta/config.json +++ b/exercises/practice/bob/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Bob is a lackadaisical teenager. In conversation, his responses are very limited.", "authors": [ "sgrif" ], @@ -27,6 +26,7 @@ "build.sbt" ] }, + "blurb": "Bob is a lackadaisical teenager. In conversation, his responses are very limited.", "source": "Inspired by the 'Deaf Grandma' exercise in Chris Pine's Learn to Program tutorial.", "source_url": "https://pine.fm/LearnToProgram/?Chapter=06" } diff --git a/exercises/practice/book-store/.meta/config.json b/exercises/practice/book-store/.meta/config.json index a3654311..f38899d9 100644 --- a/exercises/practice/book-store/.meta/config.json +++ b/exercises/practice/book-store/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "To try and encourage more sales of different books from a popular 5 book series, a bookshop has decided to offer discounts of multiple-book purchases.", "authors": [ "ricemery" ], @@ -22,6 +21,7 @@ "build.sbt" ] }, + "blurb": "To try and encourage more sales of different books from a popular 5 book series, a bookshop has decided to offer discounts of multiple-book purchases.", "source": "Inspired by the harry potter kata from Cyber-Dojo.", "source_url": "https://cyber-dojo.org" } diff --git a/exercises/practice/bowling/.meta/config.json b/exercises/practice/bowling/.meta/config.json index 6fb0fd1b..dfd8e4d6 100644 --- a/exercises/practice/bowling/.meta/config.json +++ b/exercises/practice/bowling/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Score a bowling game.", "authors": [ "ricemery" ], @@ -21,6 +20,7 @@ "build.sbt" ] }, + "blurb": "Score a bowling game.", "source": "The Bowling Game Kata from UncleBob", "source_url": "https://web.archive.org/web/20221001111000/http://butunclebob.com/ArticleS.UncleBob.TheBowlingGameKata" } diff --git a/exercises/practice/change/.meta/config.json b/exercises/practice/change/.meta/config.json index 974bd70f..1a2c45d1 100644 --- a/exercises/practice/change/.meta/config.json +++ b/exercises/practice/change/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Correctly determine change to be given using the least number of coins.", "authors": [ "abo64" ], @@ -23,6 +22,7 @@ "build.sbt" ] }, + "blurb": "Correctly determine change to be given using the least number of coins.", "source": "Software Craftsmanship - Coin Change Kata", "source_url": "https://web.archive.org/web/20130115115225/http://craftsmanship.sv.cmu.edu:80/exercises/coin-change-kata" } diff --git a/exercises/practice/circular-buffer/.meta/config.json b/exercises/practice/circular-buffer/.meta/config.json index 7034dbea..a5825489 100644 --- a/exercises/practice/circular-buffer/.meta/config.json +++ b/exercises/practice/circular-buffer/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.scala" + ], + "invalidator": [ + "build.sbt" ] }, "blurb": "A data structure that uses a single, fixed-size buffer as if it were connected end-to-end.", diff --git a/exercises/practice/clock/.meta/config.json b/exercises/practice/clock/.meta/config.json index 5d763e1a..6e7c2a84 100644 --- a/exercises/practice/clock/.meta/config.json +++ b/exercises/practice/clock/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Implement a clock that handles times without dates.", "authors": [ "ricemery" ], @@ -22,5 +21,6 @@ "build.sbt" ] }, + "blurb": "Implement a clock that handles times without dates.", "source": "Pairing session with Erin Drummond" } diff --git a/exercises/practice/collatz-conjecture/.approaches/config.json b/exercises/practice/collatz-conjecture/.approaches/config.json index 5fea3ce4..5c028bff 100644 --- a/exercises/practice/collatz-conjecture/.approaches/config.json +++ b/exercises/practice/collatz-conjecture/.approaches/config.json @@ -1,7 +1,8 @@ { "introduction": { - "authors": ["bobahop"], - "contributors": [] + "authors": [ + "bobahop" + ] }, "approaches": [ { @@ -9,14 +10,18 @@ "slug": "filter-map-stream-takewhile", "title": "filter and map with Stream and takeWhile", "blurb": "Use filter and map with Stream and takeWhile to return the answer.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] }, { "uuid": "78e77a70-d872-4236-a569-9c9f038d39d3", "slug": "match-recursion", "title": "match with recursion", "blurb": "Use match with recursion to return the answer.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] } ] } diff --git a/exercises/practice/collatz-conjecture/.meta/config.json b/exercises/practice/collatz-conjecture/.meta/config.json index ccad7cd4..d7f2176d 100644 --- a/exercises/practice/collatz-conjecture/.meta/config.json +++ b/exercises/practice/collatz-conjecture/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Calculate the number of steps to reach 1 using the Collatz conjecture.", "authors": [], "contributors": [ "ErikSchierboom", @@ -22,6 +21,7 @@ "build.sbt" ] }, + "blurb": "Calculate the number of steps to reach 1 using the Collatz conjecture.", "source": "An unsolved problem in mathematics named after mathematician Lothar Collatz", "source_url": "https://en.wikipedia.org/wiki/3x_%2B_1_problem" } diff --git a/exercises/practice/complex-numbers/.meta/config.json b/exercises/practice/complex-numbers/.meta/config.json index 635eeaa7..8534dfa8 100644 --- a/exercises/practice/complex-numbers/.meta/config.json +++ b/exercises/practice/complex-numbers/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Implement complex numbers.", "authors": [ "ricemery" ], @@ -22,6 +21,7 @@ "build.sbt" ] }, + "blurb": "Implement complex numbers.", "source": "Wikipedia", "source_url": "https://en.wikipedia.org/wiki/Complex_number" } diff --git a/exercises/practice/connect/.meta/config.json b/exercises/practice/connect/.meta/config.json index 961f14ad..8de81017 100644 --- a/exercises/practice/connect/.meta/config.json +++ b/exercises/practice/connect/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Compute the result for a game of Hex / Polygon.", "authors": [ "ricemery" ], @@ -24,5 +23,6 @@ "invalidator": [ "build.sbt" ] - } + }, + "blurb": "Compute the result for a game of Hex / Polygon." } diff --git a/exercises/practice/crypto-square/.meta/config.json b/exercises/practice/crypto-square/.meta/config.json index 5a182df9..40a1d15b 100644 --- a/exercises/practice/crypto-square/.meta/config.json +++ b/exercises/practice/crypto-square/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Implement the classic method for composing secret messages called a square code.", "authors": [ "ricemery" ], @@ -23,6 +22,7 @@ "build.sbt" ] }, + "blurb": "Implement the classic method for composing secret messages called a square code.", "source": "J Dalbey's Programming Practice problems", "source_url": "https://users.csc.calpoly.edu/~jdalbey/103/Projects/ProgrammingPractice.html" } diff --git a/exercises/practice/custom-set/.meta/config.json b/exercises/practice/custom-set/.meta/config.json index ecf87af4..fcd2a7b9 100644 --- a/exercises/practice/custom-set/.meta/config.json +++ b/exercises/practice/custom-set/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Create a custom set type.", "authors": [ "ricemery" ], @@ -21,5 +20,6 @@ "invalidator": [ "build.sbt" ] - } + }, + "blurb": "Create a custom set type." } diff --git a/exercises/practice/darts/.docs/instructions.md b/exercises/practice/darts/.docs/instructions.md index 5e57a860..6518201c 100644 --- a/exercises/practice/darts/.docs/instructions.md +++ b/exercises/practice/darts/.docs/instructions.md @@ -1,6 +1,6 @@ # Instructions -Write a function that returns the earned points in a single toss of a Darts game. +Calculate the points scored in a single toss of a Darts game. [Darts][darts] is a game where players throw darts at a [target][darts-target]. @@ -16,7 +16,7 @@ In our particular instance of the game, the target rewards 4 different amounts o The outer circle has a radius of 10 units (this is equivalent to the total radius for the entire target), the middle circle a radius of 5 units, and the inner circle a radius of 1. Of course, they are all centered at the same point — that is, the circles are [concentric][] defined by the coordinates (0, 0). -Write a function that given a point in the target (defined by its [Cartesian coordinates][cartesian-coordinates] `x` and `y`, where `x` and `y` are [real][real-numbers]), returns the correct amount earned by a dart landing at that point. +Given a point in the target (defined by its [Cartesian coordinates][cartesian-coordinates] `x` and `y`, where `x` and `y` are [real][real-numbers]), calculate the correct score earned by a dart landing at that point. ## Credit diff --git a/exercises/practice/darts/.meta/config.json b/exercises/practice/darts/.meta/config.json index a8357969..68a0a033 100644 --- a/exercises/practice/darts/.meta/config.json +++ b/exercises/practice/darts/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Write a function that returns the earned points in a single toss of a Darts game.", "authors": [ "ricemery" ], @@ -22,5 +21,6 @@ "build.sbt" ] }, + "blurb": "Calculate the points scored in a single toss of a Darts game.", "source": "Inspired by an exercise created by a professor Della Paolera in Argentina" } diff --git a/exercises/practice/diamond/.meta/config.json b/exercises/practice/diamond/.meta/config.json index 8affd230..d00dbc22 100644 --- a/exercises/practice/diamond/.meta/config.json +++ b/exercises/practice/diamond/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Given a letter, print a diamond starting with 'A' with the supplied letter at the widest point.", "authors": [ "ricemery" ], @@ -22,6 +21,7 @@ "build.sbt" ] }, + "blurb": "Given a letter, print a diamond starting with 'A' with the supplied letter at the widest point.", "source": "Seb Rose", "source_url": "https://web.archive.org/web/20220807163751/http://claysnow.co.uk/recycling-tests-in-tdd/" } diff --git a/exercises/practice/difference-of-squares/.meta/config.json b/exercises/practice/difference-of-squares/.meta/config.json index b3cd6859..17cae45e 100644 --- a/exercises/practice/difference-of-squares/.meta/config.json +++ b/exercises/practice/difference-of-squares/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Find the difference between the square of the sum and the sum of the squares of the first N natural numbers.", "authors": [ "ricemery" ], @@ -23,6 +22,7 @@ "build.sbt" ] }, + "blurb": "Find the difference between the square of the sum and the sum of the squares of the first N natural numbers.", "source": "Problem 6 at Project Euler", "source_url": "https://projecteuler.net/problem=6" } diff --git a/exercises/practice/dominoes/.meta/config.json b/exercises/practice/dominoes/.meta/config.json index c50f2c9f..e97d2eea 100644 --- a/exercises/practice/dominoes/.meta/config.json +++ b/exercises/practice/dominoes/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Make a chain of dominoes.", "authors": [ "abo64" ], @@ -22,5 +21,6 @@ "invalidator": [ "build.sbt" ] - } + }, + "blurb": "Make a chain of dominoes." } diff --git a/exercises/practice/etl/.meta/config.json b/exercises/practice/etl/.meta/config.json index a78bc943..8231e729 100644 --- a/exercises/practice/etl/.meta/config.json +++ b/exercises/practice/etl/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Change the data format for scoring a game to more easily add other languages.", "authors": [ "sgrif" ], @@ -24,6 +23,7 @@ "build.sbt" ] }, + "blurb": "Change the data format for scoring a game to more easily add other languages.", "source": "Based on an 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/flatten-array/.docs/instructions.md b/exercises/practice/flatten-array/.docs/instructions.md index 51bea679..89dacfa3 100644 --- a/exercises/practice/flatten-array/.docs/instructions.md +++ b/exercises/practice/flatten-array/.docs/instructions.md @@ -2,7 +2,7 @@ Take a nested list and return a single flattened list with all values except nil/null. -The challenge is to write a function that accepts an arbitrarily-deep nested list-like structure and returns a flattened structure without any nil/null values. +The challenge is to take an arbitrarily-deep nested list-like structure and produce a flattened structure without any nil/null values. For example: diff --git a/exercises/practice/flatten-array/.meta/config.json b/exercises/practice/flatten-array/.meta/config.json index 3386d222..28e2fca6 100644 --- a/exercises/practice/flatten-array/.meta/config.json +++ b/exercises/practice/flatten-array/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Take a nested list and return a single list with all values except nil/null.", "authors": [ "dmitryn" ], @@ -23,6 +22,7 @@ "build.sbt" ] }, + "blurb": "Take a nested list and return a single list with all values except nil/null.", "source": "Interview Question", "source_url": "https://reference.wolfram.com/language/ref/Flatten.html" } diff --git a/exercises/practice/food-chain/.approaches/config.json b/exercises/practice/food-chain/.approaches/config.json index 8c860867..13044e23 100644 --- a/exercises/practice/food-chain/.approaches/config.json +++ b/exercises/practice/food-chain/.approaches/config.json @@ -1,7 +1,8 @@ { "introduction": { - "authors": ["bobahop"], - "contributors": [] + "authors": [ + "bobahop" + ] }, "approaches": [ { @@ -9,7 +10,9 @@ "slug": "move-complexity-to-data", "title": "Move complexity to data", "blurb": "Move complexity to data to keep code simple.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] } ] } diff --git a/exercises/practice/food-chain/.meta/config.json b/exercises/practice/food-chain/.meta/config.json index a566a903..8523b7fd 100644 --- a/exercises/practice/food-chain/.meta/config.json +++ b/exercises/practice/food-chain/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Generate the lyrics of the song 'I Know an Old Lady Who Swallowed a Fly'.", "authors": [ "ricemery" ], @@ -22,6 +21,7 @@ "build.sbt" ] }, + "blurb": "Generate the lyrics of the song 'I Know an Old Lady Who Swallowed a Fly'.", "source": "Wikipedia", "source_url": "https://en.wikipedia.org/wiki/There_Was_an_Old_Lady_Who_Swallowed_a_Fly" } diff --git a/exercises/practice/forth/.meta/config.json b/exercises/practice/forth/.meta/config.json index b834bfc7..f20b2a76 100644 --- a/exercises/practice/forth/.meta/config.json +++ b/exercises/practice/forth/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Implement an evaluator for a very simple subset of Forth.", "authors": [ "ricemery" ], @@ -21,5 +20,6 @@ "invalidator": [ "build.sbt" ] - } + }, + "blurb": "Implement an evaluator for a very simple subset of Forth." } diff --git a/exercises/practice/gigasecond/.meta/config.json b/exercises/practice/gigasecond/.meta/config.json index 60a69ba1..0f54660c 100644 --- a/exercises/practice/gigasecond/.meta/config.json +++ b/exercises/practice/gigasecond/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Given a moment, determine the moment that would be after a gigasecond has passed.", "authors": [ "sgrif" ], @@ -25,6 +24,7 @@ "build.sbt" ] }, + "blurb": "Given a moment, determine the moment that would be after a gigasecond has passed.", "source": "Chapter 9 in Chris Pine's online Learn to Program tutorial.", "source_url": "https://pine.fm/LearnToProgram/?Chapter=09" } diff --git a/exercises/practice/grade-school/.meta/config.json b/exercises/practice/grade-school/.meta/config.json index ed514f83..218db3ec 100644 --- a/exercises/practice/grade-school/.meta/config.json +++ b/exercises/practice/grade-school/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Given students' names along with the grade that they are in, create a roster for the school.", "authors": [ "sgrif" ], @@ -25,5 +24,6 @@ "build.sbt" ] }, + "blurb": "Given students' names along with the grade that they are in, create a roster for the school.", "source": "A pairing session with Phil Battos at gSchool" } diff --git a/exercises/practice/grains/.meta/config.json b/exercises/practice/grains/.meta/config.json index 47b3d2b5..a15483e8 100644 --- a/exercises/practice/grains/.meta/config.json +++ b/exercises/practice/grains/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Calculate the number of grains of wheat on a chessboard given that the number on each square doubles.", "authors": [ "sgrif" ], @@ -25,6 +24,7 @@ "build.sbt" ] }, + "blurb": "Calculate the number of grains of wheat on a chessboard given that the number on each square doubles.", "source": "The CodeRanch Cattle Drive, Assignment 6", "source_url": "https://coderanch.com/wiki/718824/Grains" } diff --git a/exercises/practice/hamming/.approaches/config.json b/exercises/practice/hamming/.approaches/config.json index d29ca795..9f17a603 100644 --- a/exercises/practice/hamming/.approaches/config.json +++ b/exercises/practice/hamming/.approaches/config.json @@ -1,7 +1,8 @@ { "introduction": { - "authors": ["bobahop"], - "contributors": [] + "authors": [ + "bobahop" + ] }, "approaches": [ { @@ -9,21 +10,27 @@ "slug": "if-zip-count", "title": "if with zip and count", "blurb": "Use if with zip and count to return the answer.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] }, { "uuid": "7bc1db17-b777-4304-bc22-092e2e3304b0", "slug": "match-zip-count", "title": "match with zip and count", "blurb": "Use match with zip and count to return the answer.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] }, { "uuid": "849af0db-824b-4560-b5c6-e65b0cd7bb3e", "slug": "match-recursion", "title": "match with recursion", "blurb": "Use match with recursion to return the answer.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] } ] } diff --git a/exercises/practice/hamming/.docs/instructions.md b/exercises/practice/hamming/.docs/instructions.md index 020fdd02..b9ae6efc 100644 --- a/exercises/practice/hamming/.docs/instructions.md +++ b/exercises/practice/hamming/.docs/instructions.md @@ -1,6 +1,6 @@ # Instructions -Calculate the Hamming Distance between two DNA strands. +Calculate the Hamming distance between two DNA strands. Your body is made up of cells that contain DNA. Those cells regularly wear out and need replacing, which they achieve by dividing into daughter cells. @@ -9,18 +9,18 @@ In fact, the average human body experiences about 10 quadrillion cell divisions When cells divide, their DNA replicates too. Sometimes during this process mistakes happen and single pieces of DNA get encoded with the incorrect information. If we compare two strands of DNA and count the differences between them we can see how many mistakes occurred. -This is known as the "Hamming Distance". +This is known as the "Hamming distance". -We read DNA using the letters C,A,G and T. +We read DNA using the letters C, A, G and T. Two strands might look like this: GAGCCTACTAACGGGAT CATCGTAATGACGGCCT ^ ^ ^ ^ ^ ^^ -They have 7 differences, and therefore the Hamming Distance is 7. +They have 7 differences, and therefore the Hamming distance is 7. -The Hamming Distance is useful for lots of things in science, not just biology, so it's a nice phrase to be familiar with :) +The Hamming distance is useful for lots of things in science, not just biology, so it's a nice phrase to be familiar with :) ## Implementation notes diff --git a/exercises/practice/hamming/.meta/config.json b/exercises/practice/hamming/.meta/config.json index 1982b7d8..a04cf231 100644 --- a/exercises/practice/hamming/.meta/config.json +++ b/exercises/practice/hamming/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Calculate the Hamming difference between two DNA strands.", "authors": [ "sgrif" ], @@ -26,6 +25,7 @@ "build.sbt" ] }, + "blurb": "Calculate the Hamming difference between two DNA strands.", "source": "The Calculating Point Mutations problem at Rosalind", "source_url": "https://rosalind.info/problems/hamm/" } diff --git a/exercises/practice/hello-world/.meta/config.json b/exercises/practice/hello-world/.meta/config.json index f631585b..43ce0a1d 100644 --- a/exercises/practice/hello-world/.meta/config.json +++ b/exercises/practice/hello-world/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Exercism's classic introductory exercise. Just say \"Hello, World!\".", "authors": [ "ricemery" ], @@ -24,6 +23,7 @@ "build.sbt" ] }, + "blurb": "Exercism's classic introductory exercise. Just say \"Hello, World!\".", "source": "This is an exercise to introduce users to using Exercism", "source_url": "https://en.wikipedia.org/wiki/%22Hello,_world!%22_program" } diff --git a/exercises/practice/high-scores/.meta/config.json b/exercises/practice/high-scores/.meta/config.json index 082611b6..abf272b4 100644 --- a/exercises/practice/high-scores/.meta/config.json +++ b/exercises/practice/high-scores/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Manage a player's High Score list.", "authors": [ "ricemery" ], @@ -23,5 +22,6 @@ "build.sbt" ] }, + "blurb": "Manage a player's High Score list.", "source": "Tribute to the eighties' arcade game Frogger" } diff --git a/exercises/practice/house/.meta/config.json b/exercises/practice/house/.meta/config.json index a6f7ca8e..373727ae 100644 --- a/exercises/practice/house/.meta/config.json +++ b/exercises/practice/house/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Output the nursery rhyme 'This is the House that Jack Built'.", "authors": [ "ricemery" ], @@ -22,6 +21,7 @@ "build.sbt" ] }, + "blurb": "Output the nursery rhyme 'This is the House that Jack Built'.", "source": "British nursery rhyme", "source_url": "https://en.wikipedia.org/wiki/This_Is_The_House_That_Jack_Built" } diff --git a/exercises/practice/isogram/.meta/config.json b/exercises/practice/isogram/.meta/config.json index e63af309..c5dcd4ec 100644 --- a/exercises/practice/isogram/.meta/config.json +++ b/exercises/practice/isogram/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Determine if a word or phrase is an isogram.", "authors": [ "ricemery" ], @@ -22,6 +21,7 @@ "build.sbt" ] }, + "blurb": "Determine if a word or phrase is an isogram.", "source": "Wikipedia", "source_url": "https://en.wikipedia.org/wiki/Isogram" } diff --git a/exercises/practice/kindergarten-garden/.meta/config.json b/exercises/practice/kindergarten-garden/.meta/config.json index d8ea2b07..92a3deb1 100644 --- a/exercises/practice/kindergarten-garden/.meta/config.json +++ b/exercises/practice/kindergarten-garden/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Given a diagram, determine which plants each child in the kindergarten class is responsible for.", "authors": [ "ricemery" ], @@ -22,6 +21,7 @@ "build.sbt" ] }, + "blurb": "Given a diagram, determine which plants each child in the kindergarten class is responsible for.", "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/largest-series-product/.meta/config.json b/exercises/practice/largest-series-product/.meta/config.json index 17e3b68d..ed536e8c 100644 --- a/exercises/practice/largest-series-product/.meta/config.json +++ b/exercises/practice/largest-series-product/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Given a string of digits, calculate the largest product for a contiguous substring of digits of length n.", "authors": [ "ricemery" ], @@ -23,6 +22,7 @@ "build.sbt" ] }, + "blurb": "Given a string of digits, calculate the largest product for a contiguous substring of digits of length n.", "source": "A variation on Problem 8 at Project Euler", "source_url": "https://projecteuler.net/problem=8" } diff --git a/exercises/practice/leap/.approaches/config.json b/exercises/practice/leap/.approaches/config.json index 8f1763fa..98ee1254 100644 --- a/exercises/practice/leap/.approaches/config.json +++ b/exercises/practice/leap/.approaches/config.json @@ -1,7 +1,8 @@ { "introduction": { - "authors": ["bobahop"], - "contributors": [] + "authors": [ + "bobahop" + ] }, "approaches": [ { @@ -9,35 +10,45 @@ "slug": "boolean-chain", "title": "Boolean chain", "blurb": "Use a chain of boolean expressions.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] }, { "uuid": "ec67dae7-6709-4ee9-af82-ce90520b0199", "slug": "ternary-expression", "title": "Ternary expression", "blurb": "Use a ternary expression of boolean conditions.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] }, { "uuid": "bf3c02ca-5082-4eee-a580-ce1d72f522d9", "slug": "match-on-a-tuple", "title": "match on a tuple", "blurb": "Use a match on a tuple made from boolean expressions.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] }, { "uuid": "7d9baeca-be7b-4c3b-b56f-e033dbe3a8c8", "slug": "localdate-plusdays", "title": "LocalDate plusDays", "blurb": "Use LocalDate plusDays.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] }, { "uuid": "d22e54b1-ff48-49ff-b069-4e55210c1d19", "slug": "built-in-method", "title": "Built-in method", "blurb": "Use the built-in method.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] } ] } diff --git a/exercises/practice/leap/.meta/config.json b/exercises/practice/leap/.meta/config.json index 25185c5c..8559bfd2 100644 --- a/exercises/practice/leap/.meta/config.json +++ b/exercises/practice/leap/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Determine whether a given year is a leap year.", "authors": [ "sgrif" ], @@ -25,6 +24,7 @@ "build.sbt" ] }, + "blurb": "Determine whether a given year is a leap year.", "source": "CodeRanch Cattle Drive, Assignment 3", "source_url": "https://coderanch.com/t/718816/Leap" } diff --git a/exercises/practice/lens-person/.meta/config.json b/exercises/practice/lens-person/.meta/config.json index 4f7abd39..d62e11c1 100644 --- a/exercises/practice/lens-person/.meta/config.json +++ b/exercises/practice/lens-person/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Use lenses to update nested records (specific to languages with immutable data).", "authors": [ "abo64" ], @@ -22,5 +21,6 @@ "invalidator": [ "build.sbt" ] - } + }, + "blurb": "Use lenses to update nested records (specific to languages with immutable data)." } diff --git a/exercises/practice/linked-list/.meta/config.json b/exercises/practice/linked-list/.meta/config.json index 8b631a9a..1074d61b 100644 --- a/exercises/practice/linked-list/.meta/config.json +++ b/exercises/practice/linked-list/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Implement a doubly linked list.", "authors": [ "ricemery" ], @@ -22,5 +21,6 @@ "build.sbt" ] }, + "blurb": "Implement a doubly linked list.", "source": "Classic computer science topic" } diff --git a/exercises/practice/luhn/.approaches/config.json b/exercises/practice/luhn/.approaches/config.json index 0ffbe9c7..35dc3f9a 100644 --- a/exercises/practice/luhn/.approaches/config.json +++ b/exercises/practice/luhn/.approaches/config.json @@ -1,7 +1,8 @@ { "introduction": { - "authors": ["bobahop"], - "contributors": [] + "authors": [ + "bobahop" + ] }, "approaches": [ { @@ -9,28 +10,36 @@ "slug": "validate-scrub-foldright", "title": "Validate and scrub, then foldRight", "blurb": "Validate, scrub out spaces and foldRight.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] }, { "uuid": "c8178920-dd6b-42ad-a5fd-565ea0f3a075", "slug": "validate-scrub-recursion", "title": "Validate and scrub, then recurse", "blurb": "Validate, scrub out spaces and recurse.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] }, { "uuid": "0929607d-e800-4698-bed8-2363b2d6b0ad", "slug": "foldright", "title": "foldRight", "blurb": "foldRight while ignoring spaces and checking for digit.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] }, { "uuid": "55cad21b-837b-449e-9bb3-a1ce5563eab3", "slug": "recursion", "title": "Recursion", "blurb": "Recurse while ignoring spaces and checking for digit.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] } ] } diff --git a/exercises/practice/luhn/.docs/instructions.md b/exercises/practice/luhn/.docs/instructions.md index 8cbe791f..49934c10 100644 --- a/exercises/practice/luhn/.docs/instructions.md +++ b/exercises/practice/luhn/.docs/instructions.md @@ -22,7 +22,8 @@ The first step of the Luhn algorithm is to double every second digit, starting f We will be doubling ```text -4_3_ 3_9_ 0_4_ 6_6_ +4539 3195 0343 6467 +↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ (double these) ``` If doubling the number results in a number greater than 9 then subtract 9 from the product. diff --git a/exercises/practice/luhn/.meta/config.json b/exercises/practice/luhn/.meta/config.json index 096bcae3..540453eb 100644 --- a/exercises/practice/luhn/.meta/config.json +++ b/exercises/practice/luhn/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Given a number determine whether or not it is valid per the Luhn formula.", "authors": [ "ricemery" ], @@ -23,6 +22,7 @@ "build.sbt" ] }, + "blurb": "Given a number determine whether or not it is valid per the Luhn formula.", "source": "The Luhn Algorithm on Wikipedia", "source_url": "https://en.wikipedia.org/wiki/Luhn_algorithm" } diff --git a/exercises/practice/matching-brackets/.approaches/config.json b/exercises/practice/matching-brackets/.approaches/config.json index f1949d12..0a45eaf2 100644 --- a/exercises/practice/matching-brackets/.approaches/config.json +++ b/exercises/practice/matching-brackets/.approaches/config.json @@ -1,7 +1,8 @@ { "introduction": { - "authors": ["bobahop"], - "contributors": [] + "authors": [ + "bobahop" + ] }, "approaches": [ { @@ -9,14 +10,18 @@ "slug": "foldleft", "title": "foldLeft", "blurb": "foldLeft to iterate for the result.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] }, { "uuid": "cb041f76-3569-4723-8627-fdf5004ae341", "slug": "recursion", "title": "Recursion", "blurb": "Recurse to iterate for the result.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] } ] } diff --git a/exercises/practice/matching-brackets/.docs/instructions.md b/exercises/practice/matching-brackets/.docs/instructions.md index 544daa96..ea170842 100644 --- a/exercises/practice/matching-brackets/.docs/instructions.md +++ b/exercises/practice/matching-brackets/.docs/instructions.md @@ -1,4 +1,5 @@ # Instructions Given a string containing brackets `[]`, braces `{}`, parentheses `()`, or any combination thereof, verify that any and all pairs are matched and nested correctly. -The string may also contain other characters, which for the purposes of this exercise should be ignored. +Any other characters should be ignored. +For example, `"{what is (42)}?"` is balanced and `"[text}"` is not. diff --git a/exercises/practice/matching-brackets/.docs/introduction.md b/exercises/practice/matching-brackets/.docs/introduction.md new file mode 100644 index 00000000..0618221b --- /dev/null +++ b/exercises/practice/matching-brackets/.docs/introduction.md @@ -0,0 +1,8 @@ +# Introduction + +You're given the opportunity to write software for the Bracketeer™, an ancient but powerful mainframe. +The software that runs on it is written in a proprietary language. +Much of its syntax is familiar, but you notice _lots_ of brackets, braces and parentheses. +Despite the Bracketeer™ being powerful, it lacks flexibility. +If the source code has any unbalanced brackets, braces or parentheses, the Bracketeer™ crashes and must be rebooted. +To avoid such a scenario, you start writing code that can verify that brackets, braces, and parentheses are balanced before attempting to run it on the Bracketeer™. diff --git a/exercises/practice/matching-brackets/.meta/config.json b/exercises/practice/matching-brackets/.meta/config.json index 78b35e0f..667fd173 100644 --- a/exercises/practice/matching-brackets/.meta/config.json +++ b/exercises/practice/matching-brackets/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Make sure the brackets and braces all match.", "authors": [ "ricemery" ], @@ -22,5 +21,6 @@ "build.sbt" ] }, + "blurb": "Make sure the brackets and braces all match.", "source": "Ginna Baker" } diff --git a/exercises/practice/matrix/.meta/config.json b/exercises/practice/matrix/.meta/config.json index 7fb7966b..1386951a 100644 --- a/exercises/practice/matrix/.meta/config.json +++ b/exercises/practice/matrix/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Given a string representing a matrix of numbers, return the rows and columns of that matrix.", "authors": [ "ricemery" ], @@ -22,6 +21,7 @@ "build.sbt" ] }, + "blurb": "Given a string representing a matrix of numbers, return the rows and columns of that matrix.", "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/meetup/.meta/config.json b/exercises/practice/meetup/.meta/config.json index eac273d7..05170ca2 100644 --- a/exercises/practice/meetup/.meta/config.json +++ b/exercises/practice/meetup/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Calculate the date of meetups.", "authors": [ "sgrif" ], @@ -26,5 +25,6 @@ "build.sbt" ] }, + "blurb": "Calculate the date of meetups.", "source": "Jeremy Hinegardner mentioned a Boulder meetup that happens on the Wednesteenth of every month" } diff --git a/exercises/practice/minesweeper/.meta/config.json b/exercises/practice/minesweeper/.meta/config.json index d9955709..909e5bf4 100644 --- a/exercises/practice/minesweeper/.meta/config.json +++ b/exercises/practice/minesweeper/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Add the numbers to a minesweeper board.", "authors": [ "ricemery" ], @@ -21,5 +20,6 @@ "invalidator": [ "build.sbt" ] - } + }, + "blurb": "Add the numbers to a minesweeper board." } diff --git a/exercises/practice/nth-prime/.meta/config.json b/exercises/practice/nth-prime/.meta/config.json index d1d9f11e..2b1dca1c 100644 --- a/exercises/practice/nth-prime/.meta/config.json +++ b/exercises/practice/nth-prime/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Given a number n, determine what the nth prime is.", "authors": [ "ricemery" ], @@ -22,6 +21,7 @@ "build.sbt" ] }, + "blurb": "Given a number n, determine what the nth prime is.", "source": "A variation on Problem 7 at Project Euler", "source_url": "https://projecteuler.net/problem=7" } diff --git a/exercises/practice/nucleotide-count/.approaches/config.json b/exercises/practice/nucleotide-count/.approaches/config.json index c43c2313..91da0dd6 100644 --- a/exercises/practice/nucleotide-count/.approaches/config.json +++ b/exercises/practice/nucleotide-count/.approaches/config.json @@ -1,7 +1,8 @@ { "introduction": { - "authors": ["bobahop"], - "contributors": [] + "authors": [ + "bobahop" + ] }, "approaches": [ { @@ -9,21 +10,27 @@ "slug": "validate-map-count", "title": "Validate, then map and count", "blurb": "Validate, then count chars.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] }, { "uuid": "76bf0b1f-fb9e-4256-a8bc-65f559cf3480", "slug": "foldleft-match", "title": "foldLeft and match", "blurb": "Validate in foldLeft and match for result.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] }, { "uuid": "f5688299-5f38-4ef4-afca-89428139db16", "slug": "recursion", "title": "Recursion", "blurb": "Validate while recursing to result.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] } ] } diff --git a/exercises/practice/nucleotide-count/.meta/config.json b/exercises/practice/nucleotide-count/.meta/config.json index 77c3ef43..5ebc83f7 100644 --- a/exercises/practice/nucleotide-count/.meta/config.json +++ b/exercises/practice/nucleotide-count/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Given a DNA string, compute how many times each nucleotide occurs in the string.", "authors": [ "sgrif" ], @@ -27,6 +26,7 @@ "build.sbt" ] }, + "blurb": "Given a DNA string, compute how many times each nucleotide occurs in the string.", "source": "The Calculating DNA Nucleotides_problem at Rosalind", "source_url": "https://rosalind.info/problems/dna/" } diff --git a/exercises/practice/ocr-numbers/.meta/config.json b/exercises/practice/ocr-numbers/.meta/config.json index cadfe2cc..5f45c912 100644 --- a/exercises/practice/ocr-numbers/.meta/config.json +++ b/exercises/practice/ocr-numbers/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Given a 3 x 4 grid of pipes, underscores, and spaces, determine which number is represented, or whether it is garbled.", "authors": [ "ricemery" ], @@ -22,6 +21,7 @@ "build.sbt" ] }, + "blurb": "Given a 3 x 4 grid of pipes, underscores, and spaces, determine which number is represented, or whether it is garbled.", "source": "Inspired by the Bank OCR kata", "source_url": "https://codingdojo.org/kata/BankOCR/" } diff --git a/exercises/practice/palindrome-products/.meta/config.json b/exercises/practice/palindrome-products/.meta/config.json index 5cc54100..e6a9d5b2 100644 --- a/exercises/practice/palindrome-products/.meta/config.json +++ b/exercises/practice/palindrome-products/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Detect palindrome products in a given range.", "authors": [ "ricemery" ], @@ -22,6 +21,7 @@ "build.sbt" ] }, + "blurb": "Detect palindrome products in a given range.", "source": "Problem 4 at Project Euler", "source_url": "https://projecteuler.net/problem=4" } diff --git a/exercises/practice/pangram/.meta/config.json b/exercises/practice/pangram/.meta/config.json index ac562b3a..0d69340b 100644 --- a/exercises/practice/pangram/.meta/config.json +++ b/exercises/practice/pangram/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Determine if a sentence is a pangram.", "authors": [ "ricemery" ], @@ -23,6 +22,7 @@ "build.sbt" ] }, + "blurb": "Determine if a sentence is a pangram.", "source": "Wikipedia", "source_url": "https://en.wikipedia.org/wiki/Pangram" } diff --git a/exercises/practice/parallel-letter-frequency/.docs/instructions.md b/exercises/practice/parallel-letter-frequency/.docs/instructions.md index 85abcf86..6147b90a 100644 --- a/exercises/practice/parallel-letter-frequency/.docs/instructions.md +++ b/exercises/practice/parallel-letter-frequency/.docs/instructions.md @@ -4,4 +4,4 @@ Count the frequency of letters in texts using parallel computation. Parallelism is about doing things in parallel that can also be done sequentially. A common example is counting the frequency of letters. -Create a function that returns the total frequency of each letter in a list of texts and that employs parallelism. +Employ parallelism to calculate the total frequency of each letter in a list of texts. diff --git a/exercises/practice/parallel-letter-frequency/.meta/config.json b/exercises/practice/parallel-letter-frequency/.meta/config.json index 355dc7a1..467b22a9 100644 --- a/exercises/practice/parallel-letter-frequency/.meta/config.json +++ b/exercises/practice/parallel-letter-frequency/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Count the frequency of letters in texts using parallel computation.", "authors": [ "ricemery" ], @@ -22,5 +21,6 @@ "invalidator": [ "build.sbt" ] - } + }, + "blurb": "Count the frequency of letters in texts using parallel computation." } diff --git a/exercises/practice/pascals-triangle/.docs/instructions.md b/exercises/practice/pascals-triangle/.docs/instructions.md index f5567859..0f58f006 100644 --- a/exercises/practice/pascals-triangle/.docs/instructions.md +++ b/exercises/practice/pascals-triangle/.docs/instructions.md @@ -1,8 +1,20 @@ # Instructions -Compute Pascal's triangle up to a given number of rows. +Your task is to output the first N rows of Pascal's triangle. -In Pascal's Triangle each number is computed by adding the numbers to the right and left of the current position in the previous row. +[Pascal's triangle][wikipedia] is a triangular array of positive integers. + +In Pascal's triangle, the number of values in a row is equal to its row number (which starts at one). +Therefore, the first row has one value, the second row has two values, and so on. + +The first (topmost) row has a single value: `1`. +Subsequent rows' values are computed by adding the numbers directly to the right and left of the current position in the previous row. + +If the previous row does _not_ have a value to the left or right of the current position (which only happens for the leftmost and rightmost positions), treat that position's value as zero (effectively "ignoring" it in the summation). + +## Example + +Let's look at the first 5 rows of Pascal's Triangle: ```text 1 @@ -10,5 +22,14 @@ In Pascal's Triangle each number is computed by adding the numbers to the right 1 2 1 1 3 3 1 1 4 6 4 1 -# ... etc ``` + +The topmost row has one value, which is `1`. + +The leftmost and rightmost values have only one preceding position to consider, which is the position to its right respectively to its left. +With the topmost value being `1`, it follows from this that all the leftmost and rightmost values are also `1`. + +The other values all have two positions to consider. +For example, the fifth row's (`1 4 6 4 1`) middle value is `6`, as the values to its left and right in the preceding row are `3` and `3`: + +[wikipedia]: https://en.wikipedia.org/wiki/Pascal%27s_triangle diff --git a/exercises/practice/pascals-triangle/.docs/introduction.md b/exercises/practice/pascals-triangle/.docs/introduction.md new file mode 100644 index 00000000..60b8ec30 --- /dev/null +++ b/exercises/practice/pascals-triangle/.docs/introduction.md @@ -0,0 +1,22 @@ +# Introduction + +With the weather being great, you're not looking forward to spending an hour in a classroom. +Annoyed, you enter the class room, where you notice a strangely satisfying triangle shape on the blackboard. +Whilst waiting for your math teacher to arrive, you can't help but notice some patterns in the triangle: the outer values are all ones, each subsequent row has one more value than its previous row and the triangle is symmetrical. +Weird! + +Not long after you sit down, your teacher enters the room and explains that this triangle is the famous [Pascal's triangle][wikipedia]. + +Over the next hour, your teacher reveals some amazing things hidden in this triangle: + +- It can be used to compute how many ways you can pick K elements from N values. +- It contains the Fibonacci sequence. +- If you color odd and even numbers differently, you get a beautiful pattern called the [Sierpiński triangle][wikipedia-sierpinski-triangle]. + +The teacher implores you and your classmates to lookup other uses, and assures you that there are lots more! +At that moment, the school bell rings. +You realize that for the past hour, you were completely absorbed in learning about Pascal's triangle. +You quickly grab your laptop from your bag and go outside, ready to enjoy both the sunshine _and_ the wonders of Pascal's triangle. + +[wikipedia]: https://en.wikipedia.org/wiki/Pascal%27s_triangle +[wikipedia-sierpinski-triangle]: https://en.wikipedia.org/wiki/Sierpi%C5%84ski_triangle diff --git a/exercises/practice/pascals-triangle/.meta/config.json b/exercises/practice/pascals-triangle/.meta/config.json index 997fd40f..3ec33278 100644 --- a/exercises/practice/pascals-triangle/.meta/config.json +++ b/exercises/practice/pascals-triangle/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Compute Pascal's triangle up to a given number of rows.", "authors": [ "ricemery" ], @@ -22,6 +21,7 @@ "build.sbt" ] }, + "blurb": "Compute Pascal's triangle up to a given number of rows.", "source": "Pascal's Triangle at Wolfram Math World", "source_url": "https://www.wolframalpha.com/input/?i=Pascal%27s+triangle" } diff --git a/exercises/practice/perfect-numbers/.meta/config.json b/exercises/practice/perfect-numbers/.meta/config.json index 39b7f92d..19194163 100644 --- a/exercises/practice/perfect-numbers/.meta/config.json +++ b/exercises/practice/perfect-numbers/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Determine if a number is perfect, abundant, or deficient based on Nicomachus' (60 - 120 CE) classification scheme for positive integers.", "authors": [ "ricemery" ], @@ -22,6 +21,7 @@ "build.sbt" ] }, + "blurb": "Determine if a number is perfect, abundant, or deficient based on Nicomachus' (60 - 120 CE) classification scheme for positive integers.", "source": "Taken from Chapter 2 of Functional Thinking by Neal Ford.", "source_url": "https://www.oreilly.com/library/view/functional-thinking/9781449365509/" } diff --git a/exercises/practice/phone-number/.approaches/config.json b/exercises/practice/phone-number/.approaches/config.json index 65ebd8e0..c3928194 100644 --- a/exercises/practice/phone-number/.approaches/config.json +++ b/exercises/practice/phone-number/.approaches/config.json @@ -1,7 +1,8 @@ { "introduction": { - "authors": ["bobahop"], - "contributors": [] + "authors": [ + "bobahop" + ] }, "approaches": [ { @@ -9,21 +10,27 @@ "slug": "foldleft", "title": "foldLeft", "blurb": "Use foldLeft to return the answer.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] }, { "uuid": "232825f0-61b5-4270-85ac-aa2a3f47604e", "slug": "recursion", "title": "Recursion", "blurb": "Use recursion to return the answer.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] }, { "uuid": "69974e18-8731-4914-b2c4-1a92571034be", "slug": "regex-with-filter", "title": "Regex with filter", "blurb": "Use Regex with filter to return the answer.", - "authors": ["bobahop"] - } + "authors": [ + "bobahop" + ] + } ] } diff --git a/exercises/practice/phone-number/.meta/config.json b/exercises/practice/phone-number/.meta/config.json index 417d0f8a..7122ab97 100644 --- a/exercises/practice/phone-number/.meta/config.json +++ b/exercises/practice/phone-number/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Clean up user-entered phone numbers so that they can be sent SMS messages.", "authors": [ "sgrif" ], @@ -25,6 +24,7 @@ "build.sbt" ] }, + "blurb": "Clean up user-entered phone numbers so that they can be sent SMS messages.", "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/pig-latin/.approaches/config.json b/exercises/practice/pig-latin/.approaches/config.json index 5fff95f0..57fca48d 100644 --- a/exercises/practice/pig-latin/.approaches/config.json +++ b/exercises/practice/pig-latin/.approaches/config.json @@ -1,7 +1,8 @@ { "introduction": { - "authors": ["bobahop"], - "contributors": [] + "authors": [ + "bobahop" + ] }, "approaches": [ { @@ -9,7 +10,9 @@ "slug": "map-recursion-mkstring", "title": "map with recursion and mkString", "blurb": "Use map with recursion and mkString to return the answer.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] } ] } diff --git a/exercises/practice/pig-latin/.docs/instructions.md b/exercises/practice/pig-latin/.docs/instructions.md index 6c843080..a9645ac2 100644 --- a/exercises/practice/pig-latin/.docs/instructions.md +++ b/exercises/practice/pig-latin/.docs/instructions.md @@ -19,7 +19,7 @@ For example: ## Rule 2 -If a word begins with a one or more consonants, first move those consonants to the end of the word and then add an `"ay"` sound to the end of the word. +If a word begins with one or more consonants, first move those consonants to the end of the word and then add an `"ay"` sound to the end of the word. For example: @@ -33,7 +33,7 @@ If a word starts with zero or more consonants followed by `"qu"`, first move tho For example: -- `"quick"` -> `"ickqu"` -> `"ay"` (starts with `"qu"`, no preceding consonants) +- `"quick"` -> `"ickqu"` -> `"ickquay"` (starts with `"qu"`, no preceding consonants) - `"square"` -> `"aresqu"` -> `"aresquay"` (starts with one consonant followed by `"qu`") ## Rule 4 diff --git a/exercises/practice/pig-latin/.meta/config.json b/exercises/practice/pig-latin/.meta/config.json index e229f52b..0c28e1f6 100644 --- a/exercises/practice/pig-latin/.meta/config.json +++ b/exercises/practice/pig-latin/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Implement a program that translates from English to Pig Latin.", "authors": [ "ricemery" ], @@ -22,6 +21,7 @@ "build.sbt" ] }, + "blurb": "Implement a program that translates from English to Pig Latin.", "source": "The Pig Latin exercise at Test First Teaching by Ultrasaurus", "source_url": "https://github.com/ultrasaurus/test-first-teaching/blob/master/learn_ruby/pig_latin/" } diff --git a/exercises/practice/prime-factors/.meta/config.json b/exercises/practice/prime-factors/.meta/config.json index 9c6edff7..1e90519a 100644 --- a/exercises/practice/prime-factors/.meta/config.json +++ b/exercises/practice/prime-factors/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Compute the prime factors of a given natural number.", "authors": [ "ricemery" ], @@ -22,6 +21,7 @@ "build.sbt" ] }, + "blurb": "Compute the prime factors of a given natural number.", "source": "The Prime Factors Kata by Uncle Bob", "source_url": "https://web.archive.org/web/20221026171801/http://butunclebob.com/ArticleS.UncleBob.ThePrimeFactorsKata" } diff --git a/exercises/practice/protein-translation/.approaches/config.json b/exercises/practice/protein-translation/.approaches/config.json index d46c36fb..b967a19c 100644 --- a/exercises/practice/protein-translation/.approaches/config.json +++ b/exercises/practice/protein-translation/.approaches/config.json @@ -1,7 +1,8 @@ { "introduction": { - "authors": ["bobahop"], - "contributors": [] + "authors": [ + "bobahop" + ] }, "approaches": [ { @@ -9,14 +10,18 @@ "slug": "grouped-map-takewhile", "title": "grouped with map and takeWhile", "blurb": "Use grouped with map and takeWhile to return the answer.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] }, { "uuid": "d0fd366c-da86-4892-803e-eae1e9c61a2a", "slug": "if-else-match-recursion", "title": "if and else with match and recursion", "blurb": "Use if and else with match and recursion to return the answer.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] } ] } diff --git a/exercises/practice/protein-translation/.meta/config.json b/exercises/practice/protein-translation/.meta/config.json index 4a1cd584..8bb74373 100644 --- a/exercises/practice/protein-translation/.meta/config.json +++ b/exercises/practice/protein-translation/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Translate RNA sequences into proteins.", "authors": [ "ricemery" ], @@ -22,5 +21,6 @@ "build.sbt" ] }, + "blurb": "Translate RNA sequences into proteins.", "source": "Tyler Long" } diff --git a/exercises/practice/pythagorean-triplet/.meta/config.json b/exercises/practice/pythagorean-triplet/.meta/config.json index 58d48af1..a0f8ad37 100644 --- a/exercises/practice/pythagorean-triplet/.meta/config.json +++ b/exercises/practice/pythagorean-triplet/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "There exists exactly one Pythagorean triplet for which a + b + c = 1000. Find the triplet.", "authors": [ "ricemery" ], @@ -22,6 +21,7 @@ "build.sbt" ] }, + "blurb": "There exists exactly one Pythagorean triplet for which a + b + c = 1000. Find the triplet.", "source": "Problem 9 at Project Euler", "source_url": "https://projecteuler.net/problem=9" } diff --git a/exercises/practice/queen-attack/.meta/config.json b/exercises/practice/queen-attack/.meta/config.json index 9735538a..dcfcb9d0 100644 --- a/exercises/practice/queen-attack/.meta/config.json +++ b/exercises/practice/queen-attack/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Given the position of two queens on a chess board, indicate whether or not they are positioned so that they can attack each other.", "authors": [ "ricemery" ], @@ -23,6 +22,7 @@ "build.sbt" ] }, + "blurb": "Given the position of two queens on a chess board, indicate whether or not they are positioned so that they can attack each other.", "source": "J Dalbey's Programming Practice problems", "source_url": "https://users.csc.calpoly.edu/~jdalbey/103/Projects/ProgrammingPractice.html" } diff --git a/exercises/practice/rail-fence-cipher/.meta/config.json b/exercises/practice/rail-fence-cipher/.meta/config.json index 3ca8ad09..23c17b95 100644 --- a/exercises/practice/rail-fence-cipher/.meta/config.json +++ b/exercises/practice/rail-fence-cipher/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Implement encoding and decoding for the rail fence cipher.", "authors": [ "ricemery" ], @@ -22,6 +21,7 @@ "build.sbt" ] }, + "blurb": "Implement encoding and decoding for the rail fence cipher.", "source": "Wikipedia", "source_url": "https://en.wikipedia.org/wiki/Transposition_cipher#Rail_Fence_cipher" } diff --git a/exercises/practice/raindrops/.approaches/config.json b/exercises/practice/raindrops/.approaches/config.json index 2a12f119..f06d2709 100644 --- a/exercises/practice/raindrops/.approaches/config.json +++ b/exercises/practice/raindrops/.approaches/config.json @@ -1,7 +1,8 @@ { "introduction": { - "authors": ["bobahop"], - "contributors": [] + "authors": [ + "bobahop" + ] }, "approaches": [ { @@ -9,14 +10,18 @@ "slug": "sortedmap-filterkeys-match", "title": "SortedMap with filterKeys and match", "blurb": "Use a SortdMap to return the answer.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] }, { "uuid": "2eeac454-cbea-429e-94a4-af2d08c81e3f", "slug": "list-foldright-match", "title": "List with foldRight and match", "blurb": "Use a List to return the answer.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] } ] } diff --git a/exercises/practice/raindrops/.meta/config.json b/exercises/practice/raindrops/.meta/config.json index 52783f37..18c35c45 100644 --- a/exercises/practice/raindrops/.meta/config.json +++ b/exercises/practice/raindrops/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Convert a number to a string, the content of which depends on the number's factors.", "authors": [ "ricemery" ], @@ -22,6 +21,7 @@ "build.sbt" ] }, + "blurb": "Convert a number into its corresponding raindrop sounds - Pling, Plang and Plong.", "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.", "source_url": "https://en.wikipedia.org/wiki/Fizz_buzz" } diff --git a/exercises/practice/reverse-string/.meta/config.json b/exercises/practice/reverse-string/.meta/config.json index 230cdd4a..4b593965 100644 --- a/exercises/practice/reverse-string/.meta/config.json +++ b/exercises/practice/reverse-string/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.scala" + ], + "invalidator": [ + "build.sbt" ] }, "blurb": "Reverse a given string.", diff --git a/exercises/practice/rna-transcription/.meta/config.json b/exercises/practice/rna-transcription/.meta/config.json index b1bf3f2c..7883cfec 100644 --- a/exercises/practice/rna-transcription/.meta/config.json +++ b/exercises/practice/rna-transcription/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Given a DNA strand, return its RNA Complement Transcription.", "authors": [ "ricemery" ], @@ -24,6 +23,7 @@ "build.sbt" ] }, + "blurb": "Given a DNA strand, return its RNA Complement Transcription.", "source": "Hyperphysics", "source_url": "https://web.archive.org/web/20220408112140/http://hyperphysics.phy-astr.gsu.edu/hbase/Organic/transcription.html" } diff --git a/exercises/practice/robot-name/.approaches/config.json b/exercises/practice/robot-name/.approaches/config.json index 9d900369..9b70f63c 100644 --- a/exercises/practice/robot-name/.approaches/config.json +++ b/exercises/practice/robot-name/.approaches/config.json @@ -1,7 +1,8 @@ { "introduction": { - "authors": ["bobahop"], - "contributors": [] + "authors": [ + "bobahop" + ] }, "approaches": [ { @@ -9,14 +10,18 @@ "slug": "random-add-to-used-names", "title": "Randomly add to used names", "blurb": "Check used names for new random name.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] }, { "uuid": "112b69ce-bb53-4e20-b284-e4d9aa1d61fa", "slug": "sequential-take-from-shuffled-names", "title": "Sequentially take from shuffled names", "blurb": "Avoid collision by taking from shuffled names.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] } ] } diff --git a/exercises/practice/robot-name/.meta/config.json b/exercises/practice/robot-name/.meta/config.json index fc01274c..59b10af2 100644 --- a/exercises/practice/robot-name/.meta/config.json +++ b/exercises/practice/robot-name/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Manage robot factory settings.", "authors": [ "sgrif" ], @@ -28,5 +27,6 @@ "build.sbt" ] }, + "blurb": "Manage robot factory settings.", "source": "A debugging session with Paul Blackwell at gSchool." } diff --git a/exercises/practice/robot-simulator/.approaches/config.json b/exercises/practice/robot-simulator/.approaches/config.json index 29dcba6e..4206a6c3 100644 --- a/exercises/practice/robot-simulator/.approaches/config.json +++ b/exercises/practice/robot-simulator/.approaches/config.json @@ -1,7 +1,8 @@ { "introduction": { - "authors": ["bobahop"], - "contributors": [] + "authors": [ + "bobahop" + ] }, "approaches": [ { @@ -9,14 +10,18 @@ "slug": "foldleft", "title": "foldLeft", "blurb": "Use foldLeft for simulate.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] }, { "uuid": "c7c6a192-7897-489e-b662-6a9bf38f22ee", "slug": "recursion", "title": "Recursion", "blurb": "Use recursion for simulate.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] } ] } diff --git a/exercises/practice/robot-simulator/.meta/config.json b/exercises/practice/robot-simulator/.meta/config.json index a0993f77..05b3d7b3 100644 --- a/exercises/practice/robot-simulator/.meta/config.json +++ b/exercises/practice/robot-simulator/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Write a robot simulator.", "authors": [ "ricemery" ], @@ -23,5 +22,6 @@ "build.sbt" ] }, + "blurb": "Write a robot simulator.", "source": "Inspired by an interview question at a famous company." } diff --git a/exercises/practice/roman-numerals/.approaches/config.json b/exercises/practice/roman-numerals/.approaches/config.json index 10adab39..b1c3aeb1 100644 --- a/exercises/practice/roman-numerals/.approaches/config.json +++ b/exercises/practice/roman-numerals/.approaches/config.json @@ -1,7 +1,8 @@ { "introduction": { - "authors": ["bobahop"], - "contributors": [] + "authors": [ + "bobahop" + ] }, "approaches": [ { @@ -9,21 +10,27 @@ "slug": "iterate-takewhile-last", "title": "iterate with takeWhile and last", "blurb": "Use iterate with takeWhile and last to return the answer.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] }, { "uuid": "8cee72f4-489d-4cd5-9931-2cff3709f2bc", "slug": "vectors-recursion", "title": "Vectors recursion", "blurb": "Use recursion with Vectors to return the answer.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] }, { "uuid": "567a3c53-c340-4449-b8a2-9aef458edf16", "slug": "map-recursion", "title": "Map recursion", "blurb": "Use recursion with a Map to return the answer.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] } ] } diff --git a/exercises/practice/roman-numerals/.meta/config.json b/exercises/practice/roman-numerals/.meta/config.json index 2d4bd946..205ce823 100644 --- a/exercises/practice/roman-numerals/.meta/config.json +++ b/exercises/practice/roman-numerals/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Convert modern Arabic numbers into Roman numerals.", "authors": [ "ErikSchierboom" ], @@ -27,6 +26,7 @@ "build.sbt" ] }, + "blurb": "Convert modern Arabic numbers into Roman numerals.", "source": "The Roman Numeral Kata", "source_url": "https://codingdojo.org/kata/RomanNumerals/" } diff --git a/exercises/practice/rotational-cipher/.meta/config.json b/exercises/practice/rotational-cipher/.meta/config.json index 30c9b054..15d7103a 100644 --- a/exercises/practice/rotational-cipher/.meta/config.json +++ b/exercises/practice/rotational-cipher/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Create an implementation of the rotational cipher, also sometimes called the Caesar cipher.", "authors": [ "ricemery" ], @@ -22,6 +21,7 @@ "build.sbt" ] }, + "blurb": "Create an implementation of the rotational cipher, also sometimes called the Caesar cipher.", "source": "Wikipedia", "source_url": "https://en.wikipedia.org/wiki/Caesar_cipher" } diff --git a/exercises/practice/run-length-encoding/.meta/config.json b/exercises/practice/run-length-encoding/.meta/config.json index aa38506e..8124cac6 100644 --- a/exercises/practice/run-length-encoding/.meta/config.json +++ b/exercises/practice/run-length-encoding/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Implement run-length encoding and decoding.", "authors": [ "abo64" ], @@ -22,6 +21,7 @@ "build.sbt" ] }, + "blurb": "Implement run-length encoding and decoding.", "source": "Wikipedia", "source_url": "https://en.wikipedia.org/wiki/Run-length_encoding" } diff --git a/exercises/practice/saddle-points/.meta/config.json b/exercises/practice/saddle-points/.meta/config.json index a1585ce5..06b80100 100644 --- a/exercises/practice/saddle-points/.meta/config.json +++ b/exercises/practice/saddle-points/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Detect saddle points in a matrix.", "authors": [ "ricemery" ], @@ -22,6 +21,7 @@ "build.sbt" ] }, + "blurb": "Detect saddle points in a matrix.", "source": "J Dalbey's Programming Practice problems", "source_url": "https://users.csc.calpoly.edu/~jdalbey/103/Projects/ProgrammingPractice.html" } diff --git a/exercises/practice/say/.docs/instructions.md b/exercises/practice/say/.docs/instructions.md index fb4a6dfb..ad3d3477 100644 --- a/exercises/practice/say/.docs/instructions.md +++ b/exercises/practice/say/.docs/instructions.md @@ -30,8 +30,6 @@ Implement breaking a number up into chunks of thousands. So `1234567890` should yield a list like 1, 234, 567, and 890, while the far simpler `1000` should yield just 1 and 0. -The program must also report any values that are out of range. - ## Step 3 Now handle inserting the appropriate scale word between those chunks. diff --git a/exercises/practice/say/.meta/config.json b/exercises/practice/say/.meta/config.json index b3e0ca5e..f8d8a5cc 100644 --- a/exercises/practice/say/.meta/config.json +++ b/exercises/practice/say/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Given a number from 0 to 999,999,999,999, spell out that number in English.", "authors": [ "ricemery" ], @@ -23,6 +22,7 @@ "build.sbt" ] }, + "blurb": "Given a number from 0 to 999,999,999,999, spell out that number in English.", "source": "A variation on the JavaRanch CattleDrive, Assignment 4", "source_url": "https://coderanch.com/wiki/718804" } diff --git a/exercises/practice/scrabble-score/.approaches/config.json b/exercises/practice/scrabble-score/.approaches/config.json index 9c6f9491..9ea826e9 100644 --- a/exercises/practice/scrabble-score/.approaches/config.json +++ b/exercises/practice/scrabble-score/.approaches/config.json @@ -1,7 +1,8 @@ { "introduction": { - "authors": ["bobahop"], - "contributors": [] + "authors": [ + "bobahop" + ] }, "approaches": [ { @@ -9,14 +10,18 @@ "slug": "match-with-map", "title": "match with map", "blurb": "Use a match with map to return the answer.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] }, { "uuid": "ba7fe14d-acf6-4998-aab7-1f64a9d2c522", "slug": "map-with-map", "title": "Map with map", "blurb": "Use a Map with map to return the answer.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] } ] } diff --git a/exercises/practice/scrabble-score/.meta/config.json b/exercises/practice/scrabble-score/.meta/config.json index e24b6e94..b8dc5f62 100644 --- a/exercises/practice/scrabble-score/.meta/config.json +++ b/exercises/practice/scrabble-score/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Given a word, compute the Scrabble score for that word.", "authors": [ "ricemery" ], @@ -23,6 +22,7 @@ "build.sbt" ] }, + "blurb": "Given a word, compute the Scrabble score for that word.", "source": "Inspired by the Extreme Startup game", "source_url": "https://github.com/rchatley/extreme_startup" } diff --git a/exercises/practice/secret-handshake/.approaches/config.json b/exercises/practice/secret-handshake/.approaches/config.json index 2e1a5746..ce121dc3 100644 --- a/exercises/practice/secret-handshake/.approaches/config.json +++ b/exercises/practice/secret-handshake/.approaches/config.json @@ -1,7 +1,8 @@ { "introduction": { - "authors": ["bobahop"], - "contributors": [] + "authors": [ + "bobahop" + ] }, "approaches": [ { @@ -9,14 +10,18 @@ "slug": "foldleft-and-reverse", "title": "foldLeft and reverse", "blurb": "foldLeft and reverse to iterate to the solution.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] }, { "uuid": "f86fdf3c-1745-455c-80a5-0b5c57404ba5", "slug": "foldleft-with-appended-or-prepended", "title": "foldLeft with appended or prepended", "blurb": "foldLeft with appended or prepended to iterate to the solution.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] } ] } diff --git a/exercises/practice/secret-handshake/.meta/config.json b/exercises/practice/secret-handshake/.meta/config.json index 7368f462..f12f845b 100644 --- a/exercises/practice/secret-handshake/.meta/config.json +++ b/exercises/practice/secret-handshake/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Given a decimal number, convert it to the appropriate sequence of events for a secret handshake.", "authors": [ "ricemery" ], @@ -22,6 +21,7 @@ "build.sbt" ] }, + "blurb": "Given a decimal number, convert it to the appropriate sequence of events for a secret handshake.", "source": "Bert, in Mary Poppins", "source_url": "https://www.imdb.com/title/tt0058331/quotes/?item=qt0437047" } diff --git a/exercises/practice/series/.meta/config.json b/exercises/practice/series/.meta/config.json index d87cc7ef..7a0c74da 100644 --- a/exercises/practice/series/.meta/config.json +++ b/exercises/practice/series/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Given a string of digits, output all the contiguous substrings of length `n` in that string.", "authors": [ "ricemery" ], @@ -22,6 +21,7 @@ "build.sbt" ] }, + "blurb": "Given a string of digits, output all the contiguous substrings of length `n` in that string.", "source": "A subset of the Problem 8 at Project Euler", "source_url": "https://projecteuler.net/problem=8" } diff --git a/exercises/practice/sgf-parsing/.meta/config.json b/exercises/practice/sgf-parsing/.meta/config.json index a36ec4c0..1b890871 100644 --- a/exercises/practice/sgf-parsing/.meta/config.json +++ b/exercises/practice/sgf-parsing/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Parsing a Smart Game Format string.", "authors": [ "abo64" ], @@ -22,5 +21,6 @@ "invalidator": [ "build.sbt" ] - } + }, + "blurb": "Parsing a Smart Game Format string." } diff --git a/exercises/practice/sieve/.meta/config.json b/exercises/practice/sieve/.meta/config.json index 895d5764..7dce064e 100644 --- a/exercises/practice/sieve/.meta/config.json +++ b/exercises/practice/sieve/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Use the Sieve of Eratosthenes to find all the primes from 2 up to a given number.", "authors": [ "ricemery" ], @@ -22,6 +21,7 @@ "build.sbt" ] }, + "blurb": "Use the Sieve of Eratosthenes to find all the primes from 2 up to a given number.", "source": "Sieve of Eratosthenes at Wikipedia", "source_url": "https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes" } diff --git a/exercises/practice/simple-cipher/.meta/config.json b/exercises/practice/simple-cipher/.meta/config.json index f8eb7360..251fdda7 100644 --- a/exercises/practice/simple-cipher/.meta/config.json +++ b/exercises/practice/simple-cipher/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Implement a simple shift cipher like Caesar and a more secure substitution cipher.", "authors": [ "ricemery" ], @@ -22,6 +21,7 @@ "build.sbt" ] }, + "blurb": "Implement a simple shift cipher like Caesar and a more secure substitution cipher.", "source": "Substitution Cipher at Wikipedia", "source_url": "https://en.wikipedia.org/wiki/Substitution_cipher" } diff --git a/exercises/practice/simple-linked-list/.meta/config.json b/exercises/practice/simple-linked-list/.meta/config.json index e9e8d1b7..a8e28554 100644 --- a/exercises/practice/simple-linked-list/.meta/config.json +++ b/exercises/practice/simple-linked-list/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Write a simple linked list implementation that uses Elements and a List.", "authors": [ "ricemery" ], @@ -23,6 +22,7 @@ "build.sbt" ] }, + "blurb": "Write a simple linked list implementation that uses Elements and a List.", "source": "Inspired by 'Data Structures and Algorithms with Object-Oriented Design Patterns in Ruby', singly linked-lists.", "source_url": "https://web.archive.org/web/20160731005714/http://brpreiss.com/books/opus8/html/page96.html" } diff --git a/exercises/practice/space-age/.approaches/config.json b/exercises/practice/space-age/.approaches/config.json index bb0adcb9..944fcb3d 100644 --- a/exercises/practice/space-age/.approaches/config.json +++ b/exercises/practice/space-age/.approaches/config.json @@ -1,7 +1,8 @@ { "introduction": { - "authors": ["bobahop"], - "contributors": [] + "authors": [ + "bobahop" + ] }, "approaches": [ { @@ -9,21 +10,27 @@ "slug": "currying", "title": "Currying", "blurb": "Use currying to reduce boilerplate.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] }, { "uuid": "ba8f15f6-ea0f-4259-a94c-f96c47c4b88a", "slug": "partial-application", "title": "Partial application", "blurb": "Use partial application to reduce boilerplate.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] }, { "uuid": "46132cdf-d2fb-47e8-bc00-296b19221c3a", "slug": "applydynamic", "title": "applyDynamic", "blurb": "Use applyDynamic to reduce boilerplate.", - "authors": ["bobahop"] + "authors": [ + "bobahop" + ] } ] } diff --git a/exercises/practice/space-age/.docs/instructions.md b/exercises/practice/space-age/.docs/instructions.md index fe938cc0..f23b5e2c 100644 --- a/exercises/practice/space-age/.docs/instructions.md +++ b/exercises/practice/space-age/.docs/instructions.md @@ -1,25 +1,28 @@ # Instructions -Given an age in seconds, calculate how old someone would be on: +Given an age in seconds, calculate how old someone would be on a planet in our Solar System. -- 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 +One Earth year equals 365.25 Earth days, or 31,557,600 seconds. +If you were told someone was 1,000,000,000 seconds old, their age would be 31.69 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. +For the other planets, you have to account for their orbital period in Earth Years: -If you're wondering why Pluto didn't make the cut, go watch [this YouTube video][pluto-video]. +| Planet | Orbital period in Earth Years | +| ------- | ----------------------------- | +| Mercury | 0.2408467 | +| Venus | 0.61519726 | +| Earth | 1.0 | +| Mars | 1.8808158 | +| Jupiter | 11.862615 | +| Saturn | 29.447498 | +| Uranus | 84.016846 | +| Neptune | 164.79132 | -Note: The actual length of one complete orbit of the Earth around the sun is closer to 365.256 days (1 sidereal year). +~~~~exercism/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/.docs/introduction.md b/exercises/practice/space-age/.docs/introduction.md new file mode 100644 index 00000000..014d7885 --- /dev/null +++ b/exercises/practice/space-age/.docs/introduction.md @@ -0,0 +1,20 @@ +# Introduction + +The year is 2525 and you've just embarked on a journey to visit all planets in the Solar System (Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus and Neptune). +The first stop is Mercury, where customs require you to fill out a form (bureaucracy is apparently _not_ Earth-specific). +As you hand over the form to the customs officer, they scrutinize it and frown. +"Do you _really_ expect me to believe you're just 50 years old? +You must be closer to 200 years old!" + +Amused, you wait for the customs officer to start laughing, but they appear to be dead serious. +You realize that you've entered your age in _Earth years_, but the officer expected it in _Mercury years_! +As Mercury's orbital period around the sun is significantly shorter than Earth, you're actually a lot older in Mercury years. +After some quick calculations, you're able to provide your age in Mercury Years. +The customs officer smiles, satisfied, and waves you through. +You make a mental note to pre-calculate your planet-specific age _before_ future customs checks, to avoid such mix-ups. + +~~~~exercism/note +If you're wondering why Pluto didn't make the cut, go watch [this YouTube video][pluto-video]. + +[pluto-video]: https://www.youtube.com/watch?v=Z_2gbGXzFbs +~~~~ diff --git a/exercises/practice/space-age/.meta/config.json b/exercises/practice/space-age/.meta/config.json index b5f14ce7..c8fb4505 100644 --- a/exercises/practice/space-age/.meta/config.json +++ b/exercises/practice/space-age/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Given an age in seconds, calculate how old someone is in terms of a given planet's solar years.", "authors": [ "sgrif" ], @@ -24,6 +23,7 @@ "build.sbt" ] }, + "blurb": "Given an age in seconds, calculate how old someone is in terms of a given planet's solar years.", "source": "Partially inspired by Chapter 1 in Chris Pine's online Learn to Program tutorial.", "source_url": "https://pine.fm/LearnToProgram/?Chapter=01" } diff --git a/exercises/practice/spiral-matrix/.meta/config.json b/exercises/practice/spiral-matrix/.meta/config.json index 949fd90b..8e1df68e 100644 --- a/exercises/practice/spiral-matrix/.meta/config.json +++ b/exercises/practice/spiral-matrix/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Given the size, return a square matrix of numbers in spiral order.", "authors": [ "abo64" ], @@ -23,6 +22,7 @@ "build.sbt" ] }, + "blurb": "Given the size, return a square matrix of numbers in spiral order.", "source": "Reddit r/dailyprogrammer challenge #320 [Easy] Spiral Ascension.", "source_url": "https://web.archive.org/web/20230607064729/https://old.reddit.com/r/dailyprogrammer/comments/6i60lr/20170619_challenge_320_easy_spiral_ascension/" } diff --git a/exercises/practice/strain/.meta/config.json b/exercises/practice/strain/.meta/config.json index e7d2f469..418a6c7b 100644 --- a/exercises/practice/strain/.meta/config.json +++ b/exercises/practice/strain/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Implement the `keep` and `discard` operation on collections. Given a collection and a predicate on the collection's elements, `keep` returns a new collection containing those elements where the predicate is true, while `discard` returns a new collection containing those elements where the predicate is false.", "authors": [ "ricemery" ], @@ -22,6 +21,7 @@ "build.sbt" ] }, + "blurb": "Implement the `keep` and `discard` operation on collections.", "source": "Conversation with James Edward Gray II", "source_url": "http://graysoftinc.com/" } diff --git a/exercises/practice/sublist/.meta/config.json b/exercises/practice/sublist/.meta/config.json index 2117f25a..e525756c 100644 --- a/exercises/practice/sublist/.meta/config.json +++ b/exercises/practice/sublist/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Write a function to determine if a list is a sublist of another list.", "authors": [ "ricemery" ], @@ -22,5 +21,6 @@ "invalidator": [ "build.sbt" ] - } + }, + "blurb": "Write a function to determine if a list is a sublist of another list." } diff --git a/exercises/practice/sum-of-multiples/.meta/config.json b/exercises/practice/sum-of-multiples/.meta/config.json index f20c69c6..c90133d3 100644 --- a/exercises/practice/sum-of-multiples/.meta/config.json +++ b/exercises/practice/sum-of-multiples/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Given a number, find the sum of all the multiples of particular numbers up to but not including that number.", "authors": [ "abo64" ], @@ -23,6 +22,7 @@ "build.sbt" ] }, + "blurb": "Given a number, find the sum of all the multiples of particular numbers up to but not including that number.", "source": "A variation on Problem 1 at Project Euler", "source_url": "https://projecteuler.net/problem=1" } diff --git a/exercises/practice/triangle/.meta/config.json b/exercises/practice/triangle/.meta/config.json index 7dea8c3d..86b273d0 100644 --- a/exercises/practice/triangle/.meta/config.json +++ b/exercises/practice/triangle/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Determine if a triangle is equilateral, isosceles, or scalene.", "authors": [ "ricemery" ], @@ -23,6 +22,7 @@ "build.sbt" ] }, + "blurb": "Determine if a triangle is equilateral, isosceles, or scalene.", "source": "The Ruby Koans triangle project, parts 1 & 2", "source_url": "https://web.archive.org/web/20220831105330/http://rubykoans.com" } diff --git a/exercises/practice/two-fer/.meta/config.json b/exercises/practice/two-fer/.meta/config.json index fda38aaa..cd78bc8c 100644 --- a/exercises/practice/two-fer/.meta/config.json +++ b/exercises/practice/two-fer/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Create a sentence of the form \"One for X, one for me.\".", "authors": [ "ricemery" ], @@ -22,5 +21,6 @@ "build.sbt" ] }, + "blurb": "Create a sentence of the form \"One for X, one for me.\".", "source_url": "https://github.com/exercism/problem-specifications/issues/757" } diff --git a/exercises/practice/variable-length-quantity/.meta/config.json b/exercises/practice/variable-length-quantity/.meta/config.json index e3c31b11..2e9334e1 100644 --- a/exercises/practice/variable-length-quantity/.meta/config.json +++ b/exercises/practice/variable-length-quantity/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Implement variable length quantity encoding and decoding.", "authors": [ "ricemery" ], @@ -22,6 +21,7 @@ "build.sbt" ] }, + "blurb": "Implement variable length quantity encoding and decoding.", "source": "A poor Splice developer having to implement MIDI encoding/decoding.", "source_url": "https://splice.com" } diff --git a/exercises/practice/word-count/.meta/config.json b/exercises/practice/word-count/.meta/config.json index c879f8c6..00a9f352 100644 --- a/exercises/practice/word-count/.meta/config.json +++ b/exercises/practice/word-count/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Given a phrase, count the occurrences of each word in that phrase.", "authors": [ "sgrif" ], @@ -24,5 +23,6 @@ "build.sbt" ] }, + "blurb": "Given a phrase, count the occurrences of each word in that phrase.", "source": "This is a classic toy problem, but we were reminded of it by seeing it in the Go Tour." } diff --git a/exercises/practice/wordy/.meta/config.json b/exercises/practice/wordy/.meta/config.json index 72aad2b1..e4296e3a 100644 --- a/exercises/practice/wordy/.meta/config.json +++ b/exercises/practice/wordy/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Parse and evaluate simple math word problems returning the answer as an integer.", "authors": [ "ricemery" ], @@ -22,6 +21,7 @@ "build.sbt" ] }, + "blurb": "Parse and evaluate simple math word problems returning the answer as an integer.", "source": "Inspired by one of the generated questions in the Extreme Startup game.", "source_url": "https://github.com/rchatley/extreme_startup" } diff --git a/exercises/practice/yacht/.meta/config.json b/exercises/practice/yacht/.meta/config.json index 5963018f..35ade88d 100644 --- a/exercises/practice/yacht/.meta/config.json +++ b/exercises/practice/yacht/.meta/config.json @@ -17,6 +17,6 @@ ] }, "blurb": "Score a single throw of dice in the game Yacht.", - "source": "James Kilfiger, using wikipedia", + "source": "James Kilfiger, using Wikipedia", "source_url": "https://en.wikipedia.org/wiki/Yacht_(dice_game)" } diff --git a/exercises/practice/zebra-puzzle/.docs/instructions.md b/exercises/practice/zebra-puzzle/.docs/instructions.md index c666e33c..aedce9b2 100644 --- a/exercises/practice/zebra-puzzle/.docs/instructions.md +++ b/exercises/practice/zebra-puzzle/.docs/instructions.md @@ -12,20 +12,20 @@ The following 15 statements are all known to be true: 1. There are five houses. 2. The Englishman lives in the red house. 3. The Spaniard owns the dog. -4. Coffee is drunk in the green house. +4. The person in the green house drinks coffee. 5. The Ukrainian drinks tea. 6. The green house is immediately to the right of the ivory house. -7. The Old Gold smoker owns snails. -8. Kools are smoked in the yellow house. -9. Milk is drunk in the middle house. +7. The snail owner likes to go dancing. +8. The person in the yellow house is a painter. +9. The person in the middle house drinks milk. 10. The Norwegian lives in the first house. -11. The man who smokes Chesterfields lives in the house next to the man with the fox. -12. Kools are smoked in the house next to the house where the horse is kept. -13. The Lucky Strike smoker drinks orange juice. -14. The Japanese smokes Parliaments. +11. The person who enjoys reading lives in the house next to the person with the fox. +12. The painter's house is next to the house with the horse. +13. The person who plays football drinks orange juice. +14. The Japanese person plays chess. 15. The Norwegian lives next to the blue house. -Additionally, each of the five houses is painted a different color, and their inhabitants are of different national extractions, own different pets, drink different beverages and smoke different brands of cigarettes. +Additionally, each of the five houses is painted a different color, and their inhabitants are of different national extractions, own different pets, drink different beverages and engage in different hobbies. ~~~~exercism/note There are 24 billion (5!⁵ = 24,883,200,000) possible solutions, so try ruling out as many solutions as possible. diff --git a/exercises/practice/zebra-puzzle/.docs/introduction.md b/exercises/practice/zebra-puzzle/.docs/introduction.md index 33d688fd..bbcaa6fd 100644 --- a/exercises/practice/zebra-puzzle/.docs/introduction.md +++ b/exercises/practice/zebra-puzzle/.docs/introduction.md @@ -1,7 +1,7 @@ # Introduction The Zebra Puzzle is a famous logic puzzle in which there are five houses, each painted a different color. -The houses have different inhabitants, who have different nationalities, own different pets, drink different beverages and smoke different brands of cigarettes. +The houses have different inhabitants, who have different nationalities, own different pets, drink different beverages and enjoy different hobbies. To help you solve the puzzle, you're given 15 statements describing the solution. However, only by combining the information in _all_ statements will you be able to find the solution to the puzzle. diff --git a/exercises/practice/zebra-puzzle/.meta/config.json b/exercises/practice/zebra-puzzle/.meta/config.json index 8e764e8a..8e7953cb 100644 --- a/exercises/practice/zebra-puzzle/.meta/config.json +++ b/exercises/practice/zebra-puzzle/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Solve the zebra puzzle.", "authors": [ "abo64" ], @@ -23,6 +22,7 @@ "build.sbt" ] }, + "blurb": "Solve the zebra puzzle.", "source": "Wikipedia", "source_url": "https://en.wikipedia.org/wiki/Zebra_Puzzle" } diff --git a/exercises/practice/zipper/.meta/config.json b/exercises/practice/zipper/.meta/config.json index f3d13f25..7534d7a7 100644 --- a/exercises/practice/zipper/.meta/config.json +++ b/exercises/practice/zipper/.meta/config.json @@ -1,5 +1,4 @@ { - "blurb": "Creating a zipper for a binary tree.", "authors": [ "abo64" ], @@ -22,5 +21,6 @@ "invalidator": [ "build.sbt" ] - } + }, + "blurb": "Creating a zipper for a binary tree." }