From 3382c7a08cc28d925acc893853b48b9cf5bfb8e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20B=20Nagy?= <20251272+BNAndras@users.noreply.github.com> Date: Mon, 14 Oct 2024 15:54:51 -0700 Subject: [PATCH] Sync docs and metadata --- .../practice/accumulate/.meta/config.json | 2 +- .../practice/acronym/.docs/instructions.md | 10 ++-- exercises/practice/acronym/.meta/config.json | 3 ++ .../affine-cipher/.docs/instructions.md | 8 +-- .../practice/affine-cipher/.meta/config.json | 3 ++ .../practice/allergies/.docs/instructions.md | 2 +- .../armstrong-numbers/.docs/instructions.md | 4 +- .../armstrong-numbers/.meta/config.json | 3 ++ .../bank-account/.docs/instructions.md | 2 +- .../practice/bank-account/.meta/config.json | 3 ++ .../practice/beer-song/.meta/config.json | 3 ++ .../binary-search/.docs/instructions.md | 2 +- .../practice/binary-search/.meta/config.json | 3 ++ .../practice/binary/.docs/instructions.md | 2 +- .../practice/book-store/.docs/instructions.md | 8 +-- .../practice/book-store/.meta/config.json | 3 ++ .../practice/bowling/.docs/instructions.md | 6 +-- exercises/practice/bowling/.meta/config.json | 3 ++ exercises/practice/change/.meta/config.json | 3 ++ .../circular-buffer/.docs/instructions.md | 48 +++++++++++------ .../circular-buffer/.meta/config.json | 3 ++ exercises/practice/clock/.meta/config.json | 3 +- .../practice/darts/.docs/instructions.md | 12 ++++- exercises/practice/darts/.meta/config.json | 5 +- .../difference-of-squares/.meta/config.json | 3 ++ .../practice/diffie-hellman/.meta/config.json | 3 ++ .../practice/dnd-character/.meta/config.json | 3 ++ .../practice/error-handling/.meta/config.json | 3 ++ exercises/practice/etl/.meta/config.json | 3 ++ .../flatten-array/.docs/instructions.md | 2 +- .../practice/flatten-array/.meta/config.json | 3 ++ .../practice/food-chain/.meta/config.json | 3 ++ .../practice/gigasecond/.meta/config.json | 3 ++ .../practice/grade-school/.meta/config.json | 3 ++ exercises/practice/grains/.meta/config.json | 3 ++ exercises/practice/grep/.meta/config.json | 3 ++ .../practice/hamming/.docs/instructions.md | 10 ++-- .../practice/hello-world/.meta/config.json | 2 +- exercises/practice/house/.meta/config.json | 3 ++ .../practice/isbn-verifier/.meta/config.json | 3 ++ .../practice/isogram/.docs/instructions.md | 2 +- exercises/practice/isogram/.meta/config.json | 3 ++ .../largest-series-product/.meta/config.json | 3 ++ exercises/practice/ledger/.meta/config.json | 3 ++ .../practice/linked-list/.meta/config.json | 3 ++ .../practice/list-ops/.docs/instructions.md | 18 ++++--- exercises/practice/list-ops/.meta/config.json | 3 ++ exercises/practice/luhn/.docs/instructions.md | 3 +- exercises/practice/luhn/.meta/config.json | 3 ++ .../matching-brackets/.docs/instructions.md | 3 +- .../matching-brackets/.docs/introduction.md | 8 +++ exercises/practice/matrix/.meta/config.json | 3 ++ exercises/practice/meetup/.meta/config.json | 3 ++ .../practice/minesweeper/.meta/config.json | 3 ++ .../nucleotide-count/.meta/config.json | 3 ++ .../practice/ocr-numbers/.meta/config.json | 3 ++ exercises/practice/pangram/.meta/config.json | 3 ++ .../.docs/instructions.md | 2 +- .../.meta/config.json | 3 ++ .../perfect-numbers/.docs/instructions.md | 53 ++++++++++++------- .../phone-number/.docs/instructions.md | 10 ++-- .../practice/pig-latin/.docs/instructions.md | 4 +- .../practice/pig-latin/.meta/config.json | 3 ++ .../practice/poker/.docs/instructions.md | 2 +- exercises/practice/poker/.meta/config.json | 3 ++ .../practice/prime-factors/.meta/config.json | 3 ++ .../protein-translation/.docs/instructions.md | 20 +++---- .../protein-translation/.meta/config.json | 3 ++ exercises/practice/proverb/.meta/config.json | 3 ++ .../pythagorean-triplet/.meta/config.json | 5 +- .../queen-attack/.docs/instructions.md | 20 +++---- .../practice/queen-attack/.meta/config.json | 3 ++ .../rail-fence-cipher/.meta/config.json | 3 ++ .../practice/raindrops/.meta/config.json | 5 +- .../practice/rectangles/.meta/config.json | 3 ++ .../resistor-color-duo/.meta/config.json | 3 ++ .../resistor-color-trio/.meta/config.json | 3 ++ .../practice/rest-api/.docs/instructions.md | 22 ++++---- exercises/practice/rest-api/.meta/config.json | 3 ++ .../rna-transcription/.meta/config.json | 3 ++ .../practice/robot-name/.meta/config.json | 3 ++ .../robot-simulator/.meta/config.json | 3 ++ .../practice/roman-numerals/.meta/config.json | 3 ++ .../rotational-cipher/.docs/instructions.md | 4 +- .../rotational-cipher/.meta/config.json | 3 ++ .../run-length-encoding/.meta/config.json | 3 ++ .../practice/saddle-points/.meta/config.json | 3 ++ exercises/practice/say/.docs/instructions.md | 2 - exercises/practice/say/.meta/config.json | 3 ++ .../practice/scrabble-score/.meta/config.json | 3 ++ .../secret-handshake/.meta/config.json | 5 +- .../practice/series/.docs/instructions.md | 4 +- exercises/practice/series/.meta/config.json | 3 ++ exercises/practice/sieve/.meta/config.json | 3 ++ .../practice/simple-cipher/.meta/config.json | 3 ++ .../simple-linked-list/.meta/config.json | 3 ++ .../practice/space-age/.docs/instructions.md | 31 ++++++----- .../practice/space-age/.docs/introduction.md | 20 +++++++ .../practice/space-age/.meta/config.json | 3 ++ .../practice/spiral-matrix/.meta/config.json | 3 ++ exercises/practice/sublist/.meta/config.json | 3 ++ .../sum-of-multiples/.meta/config.json | 3 ++ .../practice/tournament/.meta/config.json | 3 ++ .../practice/transpose/.meta/config.json | 5 +- .../practice/tree-building/.meta/config.json | 3 ++ exercises/practice/triangle/.meta/config.json | 3 ++ .../practice/twelve-days/.meta/config.json | 3 ++ .../practice/two-bucket/.docs/instructions.md | 2 +- .../practice/two-bucket/.meta/config.json | 3 ++ .../.meta/config.json | 3 ++ .../practice/word-count/.meta/config.json | 3 ++ .../practice/wordy/.docs/instructions.md | 2 +- exercises/practice/wordy/.meta/config.json | 3 ++ exercises/practice/yacht/.meta/config.json | 5 +- .../zebra-puzzle/.docs/instructions.md | 18 +++---- .../zebra-puzzle/.docs/introduction.md | 2 +- .../practice/zebra-puzzle/.meta/config.json | 3 ++ exercises/practice/zipper/.meta/config.json | 3 ++ 118 files changed, 468 insertions(+), 159 deletions(-) create mode 100644 exercises/practice/matching-brackets/.docs/introduction.md create mode 100644 exercises/practice/space-age/.docs/introduction.md diff --git a/exercises/practice/accumulate/.meta/config.json b/exercises/practice/accumulate/.meta/config.json index 8f43b192..9b1c7511 100644 --- a/exercises/practice/accumulate/.meta/config.json +++ b/exercises/practice/accumulate/.meta/config.json @@ -21,5 +21,5 @@ }, "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": "https://twitter.com/jeg2" + "source_url": "http://graysoftinc.com/" } diff --git a/exercises/practice/acronym/.docs/instructions.md b/exercises/practice/acronym/.docs/instructions.md index c62fc3e8..133bd2cb 100644 --- a/exercises/practice/acronym/.docs/instructions.md +++ b/exercises/practice/acronym/.docs/instructions.md @@ -10,8 +10,8 @@ Punctuation is handled as follows: hyphens are word separators (like whitespace) For example: -|Input|Output| -|-|-| -|As Soon As Possible|ASAP| -|Liquid-crystal display|LCD| -|Thank George It's Friday!|TGIF| +| Input | Output | +| ------------------------- | ------ | +| As Soon As Possible | ASAP | +| Liquid-crystal display | LCD | +| Thank George It's Friday! | TGIF | diff --git a/exercises/practice/acronym/.meta/config.json b/exercises/practice/acronym/.meta/config.json index 559ca14f..134cef4c 100644 --- a/exercises/practice/acronym/.meta/config.json +++ b/exercises/practice/acronym/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "Acronym.vbproj" ] }, "blurb": "Convert a long phrase to its acronym.", diff --git a/exercises/practice/affine-cipher/.docs/instructions.md b/exercises/practice/affine-cipher/.docs/instructions.md index 2ad6d152..4eff918d 100644 --- a/exercises/practice/affine-cipher/.docs/instructions.md +++ b/exercises/practice/affine-cipher/.docs/instructions.md @@ -6,7 +6,7 @@ The affine cipher is a type of monoalphabetic substitution cipher. Each character is mapped to its numeric equivalent, encrypted with a mathematical function and then converted to the letter relating to its new numeric value. Although all monoalphabetic ciphers are weak, the affine cipher is much stronger than the atbash cipher, because it has many more keys. -[//]: # ( monoalphabetic as spelled by Merriam-Webster, compare to polyalphabetic ) +[//]: # " monoalphabetic as spelled by Merriam-Webster, compare to polyalphabetic " ## Encryption @@ -18,12 +18,12 @@ E(x) = (ai + b) mod m Where: -- `i` is the letter's index from `0` to the length of the alphabet - 1 +- `i` is the letter's index from `0` to the length of the alphabet - 1. - `m` is the length of the alphabet. For the Roman alphabet `m` is `26`. -- `a` and `b` are integers which make the encryption key +- `a` and `b` are integers which make up the encryption key. -Values `a` and `m` must be *coprime* (or, *relatively prime*) for automatic decryption to succeed, i.e., they have number `1` as their only common factor (more information can be found in the [Wikipedia article about coprime integers][coprime-integers]). +Values `a` and `m` must be _coprime_ (or, _relatively prime_) for automatic decryption to succeed, i.e., they have number `1` as their only common factor (more information can be found in the [Wikipedia article about coprime integers][coprime-integers]). In case `a` is not coprime to `m`, your program should indicate that this is an error. Otherwise it should encrypt or decrypt with the provided key. diff --git a/exercises/practice/affine-cipher/.meta/config.json b/exercises/practice/affine-cipher/.meta/config.json index 537adc49..e03ec74f 100644 --- a/exercises/practice/affine-cipher/.meta/config.json +++ b/exercises/practice/affine-cipher/.meta/config.json @@ -12,6 +12,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "AffineCipher.vbproj" ] }, "blurb": "Create an implementation of the Affine cipher, an ancient encryption algorithm from the Middle East.", diff --git a/exercises/practice/allergies/.docs/instructions.md b/exercises/practice/allergies/.docs/instructions.md index a1394920..daf8cfde 100644 --- a/exercises/practice/allergies/.docs/instructions.md +++ b/exercises/practice/allergies/.docs/instructions.md @@ -22,6 +22,6 @@ Now, given just that score of 34, your program should be able to say: - Whether Tom is allergic to any one of those allergens listed above. - All the allergens Tom is allergic to. -Note: a given score may include allergens **not** listed above (i.e. allergens that score 256, 512, 1024, etc.). +Note: a given score may include allergens **not** listed above (i.e. allergens that score 256, 512, 1024, etc.). Your program should ignore those components of the score. For example, if the allergy score is 257, your program should only report the eggs (1) allergy. diff --git a/exercises/practice/armstrong-numbers/.docs/instructions.md b/exercises/practice/armstrong-numbers/.docs/instructions.md index 744cfbe7..5e56bbe4 100644 --- a/exercises/practice/armstrong-numbers/.docs/instructions.md +++ b/exercises/practice/armstrong-numbers/.docs/instructions.md @@ -5,9 +5,9 @@ An [Armstrong number][armstrong-number] is a number that is the sum of its own d For example: - 9 is an Armstrong number, because `9 = 9^1 = 9` -- 10 is *not* an Armstrong number, because `10 != 1^2 + 0^2 = 1` +- 10 is _not_ an Armstrong number, because `10 != 1^2 + 0^2 = 1` - 153 is an Armstrong number, because: `153 = 1^3 + 5^3 + 3^3 = 1 + 125 + 27 = 153` -- 154 is *not* an Armstrong number, because: `154 != 1^3 + 5^3 + 4^3 = 1 + 125 + 64 = 190` +- 154 is _not_ an Armstrong number, because: `154 != 1^3 + 5^3 + 4^3 = 1 + 125 + 64 = 190` Write some code to determine whether a number is an Armstrong number. diff --git a/exercises/practice/armstrong-numbers/.meta/config.json b/exercises/practice/armstrong-numbers/.meta/config.json index 26db9805..ec9ea041 100644 --- a/exercises/practice/armstrong-numbers/.meta/config.json +++ b/exercises/practice/armstrong-numbers/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "ArmstrongNumbers.vbproj" ] }, "blurb": "Determine if a number is an Armstrong number.", 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 78c78b2c..200d93d7 100644 --- a/exercises/practice/bank-account/.meta/config.json +++ b/exercises/practice/bank-account/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "BankAccount.vbproj" ] }, "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 aad47e13..f29f0053 100644 --- a/exercises/practice/beer-song/.meta/config.json +++ b/exercises/practice/beer-song/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "BeerSong.vbproj" ] }, "blurb": "Produce the lyrics to that beloved classic, that field-trip favorite: 99 Bottles of Beer on the Wall.", diff --git a/exercises/practice/binary-search/.docs/instructions.md b/exercises/practice/binary-search/.docs/instructions.md index aa1946cf..12f4358e 100644 --- a/exercises/practice/binary-search/.docs/instructions.md +++ b/exercises/practice/binary-search/.docs/instructions.md @@ -11,7 +11,7 @@ Binary search only works when a list has been sorted. The algorithm looks like this: -- Find the middle element of a *sorted* list and compare it with the item we're looking for. +- Find the middle element of a _sorted_ list and compare it with the item we're looking for. - If the middle element is our item, then we're done! - If the middle element is greater than our item, we can eliminate that element and all the elements **after** it. - If the middle element is less than our item, we can eliminate that element and all the elements **before** it. diff --git a/exercises/practice/binary-search/.meta/config.json b/exercises/practice/binary-search/.meta/config.json index ce2fd9b1..563fb38c 100644 --- a/exercises/practice/binary-search/.meta/config.json +++ b/exercises/practice/binary-search/.meta/config.json @@ -12,6 +12,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "BinarySearch.vbproj" ] }, "blurb": "Implement a binary search algorithm.", diff --git a/exercises/practice/binary/.docs/instructions.md b/exercises/practice/binary/.docs/instructions.md index 046fd3e0..6722637e 100644 --- a/exercises/practice/binary/.docs/instructions.md +++ b/exercises/practice/binary/.docs/instructions.md @@ -20,7 +20,7 @@ A number 23 in base 10 notation can be understood as a linear combination of pow - The rightmost digit gets multiplied by 10^0 = 1 - The next number gets multiplied by 10^1 = 10 - ... -- The *n*th number gets multiplied by 10^*(n-1)*. +- The nth number gets multiplied by 10^_(n-1)_. - All these values are summed. So: `23 => 2*10^1 + 3*10^0 => 2*10 + 3*1 = 23 base 10` diff --git a/exercises/practice/book-store/.docs/instructions.md b/exercises/practice/book-store/.docs/instructions.md index 906eb587..54403f17 100644 --- a/exercises/practice/book-store/.docs/instructions.md +++ b/exercises/practice/book-store/.docs/instructions.md @@ -36,8 +36,8 @@ This would give a total of: Resulting in: -- 5 × (100% - 25%) * $8 = 5 × $6.00 = $30.00, plus -- 3 × (100% - 10%) * $8 = 3 × $7.20 = $21.60 +- 5 × (100% - 25%) × $8 = 5 × $6.00 = $30.00, plus +- 3 × (100% - 10%) × $8 = 3 × $7.20 = $21.60 Which equals $51.60. @@ -53,8 +53,8 @@ This would give a total of: Resulting in: -- 4 × (100% - 20%) * $8 = 4 × $6.40 = $25.60, plus -- 4 × (100% - 20%) * $8 = 4 × $6.40 = $25.60 +- 4 × (100% - 20%) × $8 = 4 × $6.40 = $25.60, plus +- 4 × (100% - 20%) × $8 = 4 × $6.40 = $25.60 Which equals $51.20. diff --git a/exercises/practice/book-store/.meta/config.json b/exercises/practice/book-store/.meta/config.json index 693b8ddc..9eef4f60 100644 --- a/exercises/practice/book-store/.meta/config.json +++ b/exercises/practice/book-store/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "BookStore.vbproj" ] }, "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.", diff --git a/exercises/practice/bowling/.docs/instructions.md b/exercises/practice/bowling/.docs/instructions.md index ddce7ee4..60ccad1b 100644 --- a/exercises/practice/bowling/.docs/instructions.md +++ b/exercises/practice/bowling/.docs/instructions.md @@ -23,9 +23,9 @@ There are three cases for the tabulation of a frame. Here is a three frame example: -| Frame 1 | Frame 2 | Frame 3 | -| :-------------: |:-------------:| :---------------------:| -| X (strike) | 5/ (spare) | 9 0 (open frame) | +| Frame 1 | Frame 2 | Frame 3 | +| :--------: | :--------: | :--------------: | +| X (strike) | 5/ (spare) | 9 0 (open frame) | Frame 1 is (10 + 5 + 5) = 20 diff --git a/exercises/practice/bowling/.meta/config.json b/exercises/practice/bowling/.meta/config.json index 5bb2fdf1..65d7ccad 100644 --- a/exercises/practice/bowling/.meta/config.json +++ b/exercises/practice/bowling/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "Bowling.vbproj" ] }, "blurb": "Score a bowling game.", diff --git a/exercises/practice/change/.meta/config.json b/exercises/practice/change/.meta/config.json index f9b1da87..69171fcf 100644 --- a/exercises/practice/change/.meta/config.json +++ b/exercises/practice/change/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "Change.vbproj" ] }, "blurb": "Correctly determine change to be given using the least number of coins.", diff --git a/exercises/practice/circular-buffer/.docs/instructions.md b/exercises/practice/circular-buffer/.docs/instructions.md index 3487a0f6..2ba1fda2 100644 --- a/exercises/practice/circular-buffer/.docs/instructions.md +++ b/exercises/practice/circular-buffer/.docs/instructions.md @@ -4,39 +4,55 @@ A circular buffer, cyclic buffer or ring buffer is a data structure that uses a A circular buffer first starts empty and of some predefined length. For example, this is a 7-element buffer: - - [ ][ ][ ][ ][ ][ ][ ] + +```text +[ ][ ][ ][ ][ ][ ][ ] +``` Assume that a 1 is written into the middle of the buffer (exact starting location does not matter in a circular buffer): - - [ ][ ][ ][1][ ][ ][ ] + +```text +[ ][ ][ ][1][ ][ ][ ] +``` Then assume that two more elements are added — 2 & 3 — which get appended after the 1: - - [ ][ ][ ][1][2][3][ ] + +```text +[ ][ ][ ][1][2][3][ ] +``` If two elements are then removed from the buffer, the oldest values inside the buffer are removed. The two elements removed, in this case, are 1 & 2, leaving the buffer with just a 3: - - [ ][ ][ ][ ][ ][3][ ] + +```text +[ ][ ][ ][ ][ ][3][ ] +``` If the buffer has 7 elements then it is completely full: - - [5][6][7][8][9][3][4] + +```text +[5][6][7][8][9][3][4] +``` When the buffer is full an error will be raised, alerting the client that further writes are blocked until a slot becomes free. When the buffer is full, the client can opt to overwrite the oldest data with a forced write. In this case, two more elements — A & B — are added and they overwrite the 3 & 4: - - [5][6][7][8][9][A][B] + +```text +[5][6][7][8][9][A][B] +``` 3 & 4 have been replaced by A & B making 5 now the oldest data in the buffer. Finally, if two elements are removed then what would be returned is 5 & 6 yielding the buffer: - - [ ][ ][7][8][9][A][B] + +```text +[ ][ ][7][8][9][A][B] +``` Because there is space available, if the client again uses overwrite to store C & D then the space where 5 & 6 were stored previously will be used not the location of 7 & 8. 7 is still the oldest element and the buffer is once again full. - - [C][D][7][8][9][A][B] + +```text +[C][D][7][8][9][A][B] +``` diff --git a/exercises/practice/circular-buffer/.meta/config.json b/exercises/practice/circular-buffer/.meta/config.json index a637e304..eaf4407f 100644 --- a/exercises/practice/circular-buffer/.meta/config.json +++ b/exercises/practice/circular-buffer/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "CircularBuffer.vbproj" ] }, "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 aae0ac16..3fcaf0e9 100644 --- a/exercises/practice/clock/.meta/config.json +++ b/exercises/practice/clock/.meta/config.json @@ -17,6 +17,5 @@ ] }, "blurb": "Implement a clock that handles times without dates.", - "source": "Pairing session with Erin Drummond", - "source_url": "https://twitter.com/ebdrummond" + "source": "Pairing session with Erin Drummond" } diff --git a/exercises/practice/darts/.docs/instructions.md b/exercises/practice/darts/.docs/instructions.md index 70f0e53d..6518201c 100644 --- a/exercises/practice/darts/.docs/instructions.md +++ b/exercises/practice/darts/.docs/instructions.md @@ -1,11 +1,13 @@ # 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]. In our particular instance of the game, the target rewards 4 different amounts of points, depending on where the dart lands: +![Our dart scoreboard with values from a complete miss to a bullseye](https://assets.exercism.org/images/exercises/darts/darts-scoreboard.svg) + - If the dart lands outside the target, player earns no points (0 points). - If the dart lands in the outer circle of the target, player earns 1 point. - If the dart lands in the middle circle of the target, player earns 5 points. @@ -14,10 +16,16 @@ 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 + +The scoreboard image was created by [habere-et-dispertire][habere-et-dispertire] using [Inkscape][inkscape]. [darts]: https://en.wikipedia.org/wiki/Darts [darts-target]: https://en.wikipedia.org/wiki/Darts#/media/File:Darts_in_a_dartboard.jpg [concentric]: https://mathworld.wolfram.com/ConcentricCircles.html [cartesian-coordinates]: https://www.mathsisfun.com/data/cartesian-coordinates.html [real-numbers]: https://www.mathsisfun.com/numbers/real-numbers.html +[habere-et-dispertire]: https://exercism.org/profiles/habere-et-dispertire +[inkscape]: https://en.wikipedia.org/wiki/Inkscape diff --git a/exercises/practice/darts/.meta/config.json b/exercises/practice/darts/.meta/config.json index 30dbb278..c0e871f0 100644 --- a/exercises/practice/darts/.meta/config.json +++ b/exercises/practice/darts/.meta/config.json @@ -11,8 +11,11 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "Darts.vbproj" ] }, - "blurb": "Write a function that returns the earned points in a single toss of a Darts game.", + "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/difference-of-squares/.meta/config.json b/exercises/practice/difference-of-squares/.meta/config.json index c6989d0d..3aca24ba 100644 --- a/exercises/practice/difference-of-squares/.meta/config.json +++ b/exercises/practice/difference-of-squares/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "DifferenceOfSquares.vbproj" ] }, "blurb": "Find the difference between the square of the sum and the sum of the squares of the first N natural numbers.", diff --git a/exercises/practice/diffie-hellman/.meta/config.json b/exercises/practice/diffie-hellman/.meta/config.json index 0c784e07..6fdf7997 100644 --- a/exercises/practice/diffie-hellman/.meta/config.json +++ b/exercises/practice/diffie-hellman/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "DiffieHellman.vbproj" ] }, "blurb": "Diffie-Hellman key exchange.", diff --git a/exercises/practice/dnd-character/.meta/config.json b/exercises/practice/dnd-character/.meta/config.json index 110dbd0d..41b25c13 100644 --- a/exercises/practice/dnd-character/.meta/config.json +++ b/exercises/practice/dnd-character/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "DndCharacter.vbproj" ] }, "blurb": "Randomly generate Dungeons & Dragons characters.", diff --git a/exercises/practice/error-handling/.meta/config.json b/exercises/practice/error-handling/.meta/config.json index e351c31b..ef07cc52 100644 --- a/exercises/practice/error-handling/.meta/config.json +++ b/exercises/practice/error-handling/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "ErrorHandling.vbproj" ] }, "blurb": "Implement various kinds of error handling and resource management." diff --git a/exercises/practice/etl/.meta/config.json b/exercises/practice/etl/.meta/config.json index f5a31ce3..cb332384 100644 --- a/exercises/practice/etl/.meta/config.json +++ b/exercises/practice/etl/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "Etl.vbproj" ] }, "blurb": "Change the data format for scoring a game to more easily add other languages.", 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 fb506fd9..d54f80cc 100644 --- a/exercises/practice/flatten-array/.meta/config.json +++ b/exercises/practice/flatten-array/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "FlattenArray.vbproj" ] }, "blurb": "Take a nested list and return a single list with all values except nil/null.", diff --git a/exercises/practice/food-chain/.meta/config.json b/exercises/practice/food-chain/.meta/config.json index 2596227a..196c857e 100644 --- a/exercises/practice/food-chain/.meta/config.json +++ b/exercises/practice/food-chain/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "FoodChain.vbproj" ] }, "blurb": "Generate the lyrics of the song 'I Know an Old Lady Who Swallowed a Fly'.", diff --git a/exercises/practice/gigasecond/.meta/config.json b/exercises/practice/gigasecond/.meta/config.json index 571cf758..e0dc4ea5 100644 --- a/exercises/practice/gigasecond/.meta/config.json +++ b/exercises/practice/gigasecond/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "Gigasecond.vbproj" ] }, "blurb": "Given a moment, determine the moment that would be after a gigasecond has passed.", diff --git a/exercises/practice/grade-school/.meta/config.json b/exercises/practice/grade-school/.meta/config.json index f265db35..1f34daf7 100644 --- a/exercises/practice/grade-school/.meta/config.json +++ b/exercises/practice/grade-school/.meta/config.json @@ -12,6 +12,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "GradeSchool.vbproj" ] }, "blurb": "Given students' names along with the grade that they are in, create a roster for the school.", diff --git a/exercises/practice/grains/.meta/config.json b/exercises/practice/grains/.meta/config.json index 1b3fa576..e8630ada 100644 --- a/exercises/practice/grains/.meta/config.json +++ b/exercises/practice/grains/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "Grains.vbproj" ] }, "blurb": "Calculate the number of grains of wheat on a chessboard given that the number on each square doubles.", diff --git a/exercises/practice/grep/.meta/config.json b/exercises/practice/grep/.meta/config.json index cc6be6eb..8a7885da 100644 --- a/exercises/practice/grep/.meta/config.json +++ b/exercises/practice/grep/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "Grep.vbproj" ] }, "blurb": "Search a file for lines matching a regular expression pattern. Return the line number and contents of each matching line.", 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/hello-world/.meta/config.json b/exercises/practice/hello-world/.meta/config.json index 72bd0255..8c00556e 100644 --- a/exercises/practice/hello-world/.meta/config.json +++ b/exercises/practice/hello-world/.meta/config.json @@ -19,7 +19,7 @@ "HelloWorld.vbproj" ] }, - "blurb": "The classical introductory exercise. Just say \"Hello, World!\".", + "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/house/.meta/config.json b/exercises/practice/house/.meta/config.json index 7a6b6101..4a71ca73 100644 --- a/exercises/practice/house/.meta/config.json +++ b/exercises/practice/house/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "House.vbproj" ] }, "blurb": "Output the nursery rhyme 'This is the House that Jack Built'.", diff --git a/exercises/practice/isbn-verifier/.meta/config.json b/exercises/practice/isbn-verifier/.meta/config.json index 43582c56..26dbbe47 100644 --- a/exercises/practice/isbn-verifier/.meta/config.json +++ b/exercises/practice/isbn-verifier/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "IsbnVerifier.vbproj" ] }, "blurb": "Check if a given string is a valid ISBN-10 number.", diff --git a/exercises/practice/isogram/.docs/instructions.md b/exercises/practice/isogram/.docs/instructions.md index 5e488447..2e8df851 100644 --- a/exercises/practice/isogram/.docs/instructions.md +++ b/exercises/practice/isogram/.docs/instructions.md @@ -11,4 +11,4 @@ Examples of isograms: - downstream - six-year-old -The word *isograms*, however, is not an isogram, because the s repeats. +The word _isograms_, however, is not an isogram, because the s repeats. diff --git a/exercises/practice/isogram/.meta/config.json b/exercises/practice/isogram/.meta/config.json index 03654092..c0854c03 100644 --- a/exercises/practice/isogram/.meta/config.json +++ b/exercises/practice/isogram/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "Isogram.vbproj" ] }, "blurb": "Determine if a word or phrase is an isogram.", diff --git a/exercises/practice/largest-series-product/.meta/config.json b/exercises/practice/largest-series-product/.meta/config.json index c46cea9f..4413bd46 100644 --- a/exercises/practice/largest-series-product/.meta/config.json +++ b/exercises/practice/largest-series-product/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "LargestSeriesProduct.vbproj" ] }, "blurb": "Given a string of digits, calculate the largest product for a contiguous substring of digits of length n.", diff --git a/exercises/practice/ledger/.meta/config.json b/exercises/practice/ledger/.meta/config.json index 3aab6bcc..85ba90ee 100644 --- a/exercises/practice/ledger/.meta/config.json +++ b/exercises/practice/ledger/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "Ledger.vbproj" ] }, "blurb": "Refactor a ledger printer." diff --git a/exercises/practice/linked-list/.meta/config.json b/exercises/practice/linked-list/.meta/config.json index a5be3056..9ec33365 100644 --- a/exercises/practice/linked-list/.meta/config.json +++ b/exercises/practice/linked-list/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "LinkedList.vbproj" ] }, "blurb": "Implement a doubly linked list.", diff --git a/exercises/practice/list-ops/.docs/instructions.md b/exercises/practice/list-ops/.docs/instructions.md index d3453338..ebc5dffe 100644 --- a/exercises/practice/list-ops/.docs/instructions.md +++ b/exercises/practice/list-ops/.docs/instructions.md @@ -7,11 +7,13 @@ Implement a series of basic list operations, without using existing functions. The precise number and names of the operations to be implemented will be track dependent to avoid conflicts with existing names, but the general operations you will implement include: -- `append` (*given two lists, add all items in the second list to the end of the first list*); -- `concatenate` (*given a series of lists, combine all items in all lists into one flattened list*); -- `filter` (*given a predicate and a list, return the list of all items for which `predicate(item)` is True*); -- `length` (*given a list, return the total number of items within it*); -- `map` (*given a function and a list, return the list of the results of applying `function(item)` on all items*); -- `foldl` (*given a function, a list, and initial accumulator, fold (reduce) each item into the accumulator from the left using `function(accumulator, item)`*); -- `foldr` (*given a function, a list, and an initial accumulator, fold (reduce) each item into the accumulator from the right using `function(item, accumulator)`*); -- `reverse` (*given a list, return a list with all the original items, but in reversed order*); +- `append` (_given two lists, add all items in the second list to the end of the first list_); +- `concatenate` (_given a series of lists, combine all items in all lists into one flattened list_); +- `filter` (_given a predicate and a list, return the list of all items for which `predicate(item)` is True_); +- `length` (_given a list, return the total number of items within it_); +- `map` (_given a function and a list, return the list of the results of applying `function(item)` on all items_); +- `foldl` (_given a function, a list, and initial accumulator, fold (reduce) each item into the accumulator from the left_); +- `foldr` (_given a function, a list, and an initial accumulator, fold (reduce) each item into the accumulator from the right_); +- `reverse` (_given a list, return a list with all the original items, but in reversed order_). + +Note, the ordering in which arguments are passed to the fold functions (`foldl`, `foldr`) is significant. diff --git a/exercises/practice/list-ops/.meta/config.json b/exercises/practice/list-ops/.meta/config.json index ccf7f2ad..81955a01 100644 --- a/exercises/practice/list-ops/.meta/config.json +++ b/exercises/practice/list-ops/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "ListOps.vbproj" ] }, "blurb": "Implement basic list operations." 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 cff41e8c..1b87d9e0 100644 --- a/exercises/practice/luhn/.meta/config.json +++ b/exercises/practice/luhn/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "Luhn.vbproj" ] }, "blurb": "Given a number determine whether or not it is valid per the Luhn formula.", 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/matrix/.meta/config.json b/exercises/practice/matrix/.meta/config.json index 1fb2252a..c61e2ae5 100644 --- a/exercises/practice/matrix/.meta/config.json +++ b/exercises/practice/matrix/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "Matrix.vbproj" ] }, "blurb": "Given a string representing a matrix of numbers, return the rows and columns of that matrix.", diff --git a/exercises/practice/meetup/.meta/config.json b/exercises/practice/meetup/.meta/config.json index 7aad6b71..15cc7895 100644 --- a/exercises/practice/meetup/.meta/config.json +++ b/exercises/practice/meetup/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "Meetup.vbproj" ] }, "blurb": "Calculate the date of meetups.", diff --git a/exercises/practice/minesweeper/.meta/config.json b/exercises/practice/minesweeper/.meta/config.json index 531ed6d9..d2abd59a 100644 --- a/exercises/practice/minesweeper/.meta/config.json +++ b/exercises/practice/minesweeper/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "Minesweeper.vbproj" ] }, "blurb": "Add the numbers to a minesweeper board." diff --git a/exercises/practice/nucleotide-count/.meta/config.json b/exercises/practice/nucleotide-count/.meta/config.json index b6546e6f..39bfa515 100644 --- a/exercises/practice/nucleotide-count/.meta/config.json +++ b/exercises/practice/nucleotide-count/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "NucleotideCount.vbproj" ] }, "blurb": "Given a DNA string, compute how many times each nucleotide occurs in the string.", diff --git a/exercises/practice/ocr-numbers/.meta/config.json b/exercises/practice/ocr-numbers/.meta/config.json index 445f1997..23a5aad8 100644 --- a/exercises/practice/ocr-numbers/.meta/config.json +++ b/exercises/practice/ocr-numbers/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "OcrNumbers.vbproj" ] }, "blurb": "Given a 3 x 4 grid of pipes, underscores, and spaces, determine which number is represented, or whether it is garbled.", diff --git a/exercises/practice/pangram/.meta/config.json b/exercises/practice/pangram/.meta/config.json index b59d4ac5..754b1f76 100644 --- a/exercises/practice/pangram/.meta/config.json +++ b/exercises/practice/pangram/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "Pangram.vbproj" ] }, "blurb": "Determine if a sentence is a 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 2459532d..05f42d8a 100644 --- a/exercises/practice/parallel-letter-frequency/.meta/config.json +++ b/exercises/practice/parallel-letter-frequency/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "ParallelLetterFrequency.vbproj" ] }, "blurb": "Count the frequency of letters in texts using parallel computation." diff --git a/exercises/practice/perfect-numbers/.docs/instructions.md b/exercises/practice/perfect-numbers/.docs/instructions.md index 0dae8867..b2bc82ca 100644 --- a/exercises/practice/perfect-numbers/.docs/instructions.md +++ b/exercises/practice/perfect-numbers/.docs/instructions.md @@ -1,24 +1,39 @@ # Instructions -Determine if a number is perfect, abundant, or deficient based on -Nicomachus' (60 - 120 CE) classification scheme for positive integers. - -The Greek mathematician [Nicomachus][nicomachus] devised a classification scheme for positive integers, identifying each as belonging uniquely to the categories of **perfect**, **abundant**, or **deficient** based on their [aliquot sum][aliquot-sum]. -The aliquot sum is defined as the sum of the factors of a number not including the number itself. -For example, the aliquot sum of 15 is (1 + 3 + 5) = 9 - -- **Perfect**: aliquot sum = number - - 6 is a perfect number because (1 + 2 + 3) = 6 - - 28 is a perfect number because (1 + 2 + 4 + 7 + 14) = 28 -- **Abundant**: aliquot sum > number - - 12 is an abundant number because (1 + 2 + 3 + 4 + 6) = 16 - - 24 is an abundant number because (1 + 2 + 3 + 4 + 6 + 8 + 12) = 36 -- **Deficient**: aliquot sum < number - - 8 is a deficient number because (1 + 2 + 4) = 7 - - Prime numbers are deficient - -Implement a way to determine whether a given number is **perfect**. -Depending on your language track, you may also need to implement a way to determine whether a given number is **abundant** or **deficient**. +Determine if a number is perfect, abundant, or deficient based on Nicomachus' (60 - 120 CE) classification scheme for positive integers. + +The Greek mathematician [Nicomachus][nicomachus] devised a classification scheme for positive integers, identifying each as belonging uniquely to the categories of [perfect](#perfect), [abundant](#abundant), or [deficient](#deficient) based on their [aliquot sum][aliquot-sum]. +The _aliquot sum_ is defined as the sum of the factors of a number not including the number itself. +For example, the aliquot sum of `15` is `1 + 3 + 5 = 9`. + +## Perfect + +A number is perfect when it equals its aliquot sum. +For example: + +- `6` is a perfect number because `1 + 2 + 3 = 6` +- `28` is a perfect number because `1 + 2 + 4 + 7 + 14 = 28` + +## Abundant + +A number is abundant when it is less than its aliquot sum. +For example: + +- `12` is an abundant number because `1 + 2 + 3 + 4 + 6 = 16` +- `24` is an abundant number because `1 + 2 + 3 + 4 + 6 + 8 + 12 = 36` + +## Deficient + +A number is deficient when it is greater than its aliquot sum. +For example: + +- `8` is a deficient number because `1 + 2 + 4 = 7` +- Prime numbers are deficient + +## Task + +Implement a way to determine whether a given number is [perfect](#perfect). +Depending on your language track, you may also need to implement a way to determine whether a given number is [abundant](#abundant) or [deficient](#deficient). [nicomachus]: https://en.wikipedia.org/wiki/Nicomachus [aliquot-sum]: https://en.wikipedia.org/wiki/Aliquot_sum diff --git a/exercises/practice/phone-number/.docs/instructions.md b/exercises/practice/phone-number/.docs/instructions.md index 6d3275cd..62ba48e9 100644 --- a/exercises/practice/phone-number/.docs/instructions.md +++ b/exercises/practice/phone-number/.docs/instructions.md @@ -5,18 +5,20 @@ Clean up user-entered phone numbers so that they can be sent SMS messages. The **North American Numbering Plan (NANP)** is a telephone numbering system used by many countries in North America like the United States, Canada or Bermuda. All NANP-countries share the same international country code: `1`. -NANP numbers are ten-digit numbers consisting of a three-digit Numbering Plan Area code, commonly known as *area code*, followed by a seven-digit local number. -The first three digits of the local number represent the *exchange code*, followed by the unique four-digit number which is the *subscriber number*. +NANP numbers are ten-digit numbers consisting of a three-digit Numbering Plan Area code, commonly known as _area code_, followed by a seven-digit local number. +The first three digits of the local number represent the _exchange code_, followed by the unique four-digit number which is the _subscriber number_. The format is usually represented as ```text -(NXX)-NXX-XXXX +NXX NXX-XXXX ``` where `N` is any digit from 2 through 9 and `X` is any digit from 0 through 9. -Your task is to clean up differently formatted telephone numbers by removing punctuation and the country code (1) if present. +Sometimes they also have the country code (represented as `1` or `+1`) prefixed. + +Your task is to clean up differently formatted telephone numbers by removing punctuation and the country code if present. For example, the inputs 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 f9c20b35..fb293d36 100644 --- a/exercises/practice/pig-latin/.meta/config.json +++ b/exercises/practice/pig-latin/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "PigLatin.vbproj" ] }, "blurb": "Implement a program that translates from English to Pig Latin.", diff --git a/exercises/practice/poker/.docs/instructions.md b/exercises/practice/poker/.docs/instructions.md index 492fc4c9..107cd49d 100644 --- a/exercises/practice/poker/.docs/instructions.md +++ b/exercises/practice/poker/.docs/instructions.md @@ -2,6 +2,6 @@ Pick the best hand(s) from a list of poker hands. -See [wikipedia][poker-hands] for an overview of poker hands. +See [Wikipedia][poker-hands] for an overview of poker hands. [poker-hands]: https://en.wikipedia.org/wiki/List_of_poker_hands diff --git a/exercises/practice/poker/.meta/config.json b/exercises/practice/poker/.meta/config.json index f2d2b407..4d41cb8f 100644 --- a/exercises/practice/poker/.meta/config.json +++ b/exercises/practice/poker/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "Poker.vbproj" ] }, "blurb": "Pick the best hand(s) from a list of poker hands.", diff --git a/exercises/practice/prime-factors/.meta/config.json b/exercises/practice/prime-factors/.meta/config.json index 89a37f03..e605247e 100644 --- a/exercises/practice/prime-factors/.meta/config.json +++ b/exercises/practice/prime-factors/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "PrimeFactors.vbproj" ] }, "blurb": "Compute the prime factors of a given natural number.", diff --git a/exercises/practice/protein-translation/.docs/instructions.md b/exercises/practice/protein-translation/.docs/instructions.md index d9b9054c..7dc34d2e 100644 --- a/exercises/practice/protein-translation/.docs/instructions.md +++ b/exercises/practice/protein-translation/.docs/instructions.md @@ -29,16 +29,16 @@ Note the stop codon `"UAA"` terminates the translation and the final methionine Below are the codons and resulting Amino Acids needed for the exercise. -Codon | Protein -:--- | :--- -AUG | Methionine -UUU, UUC | Phenylalanine -UUA, UUG | Leucine -UCU, UCC, UCA, UCG | Serine -UAU, UAC | Tyrosine -UGU, UGC | Cysteine -UGG | Tryptophan -UAA, UAG, UGA | STOP +| Codon | Protein | +| :----------------- | :------------ | +| AUG | Methionine | +| UUU, UUC | Phenylalanine | +| UUA, UUG | Leucine | +| UCU, UCC, UCA, UCG | Serine | +| UAU, UAC | Tyrosine | +| UGU, UGC | Cysteine | +| UGG | Tryptophan | +| UAA, UAG, UGA | STOP | Learn more about [protein translation on Wikipedia][protein-translation]. diff --git a/exercises/practice/protein-translation/.meta/config.json b/exercises/practice/protein-translation/.meta/config.json index 8de89c78..de113a3f 100644 --- a/exercises/practice/protein-translation/.meta/config.json +++ b/exercises/practice/protein-translation/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "ProteinTranslation.vbproj" ] }, "blurb": "Translate RNA sequences into proteins.", diff --git a/exercises/practice/proverb/.meta/config.json b/exercises/practice/proverb/.meta/config.json index a1ff9d09..c9bd7618 100644 --- a/exercises/practice/proverb/.meta/config.json +++ b/exercises/practice/proverb/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "Proverb.vbproj" ] }, "blurb": "For want of a horseshoe nail, a kingdom was lost, or so the saying goes. Output the full text of this proverbial rhyme.", diff --git a/exercises/practice/pythagorean-triplet/.meta/config.json b/exercises/practice/pythagorean-triplet/.meta/config.json index 246649ca..a5f602ba 100644 --- a/exercises/practice/pythagorean-triplet/.meta/config.json +++ b/exercises/practice/pythagorean-triplet/.meta/config.json @@ -11,9 +11,12 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "PythagoreanTriplet.vbproj" ] }, - "blurb": "There exists exactly one Pythagorean triplet for which a + b + c = 1000. Find the product a * b * c.", + "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/.docs/instructions.md b/exercises/practice/queen-attack/.docs/instructions.md index ad7ea954..97f22a0a 100644 --- a/exercises/practice/queen-attack/.docs/instructions.md +++ b/exercises/practice/queen-attack/.docs/instructions.md @@ -8,18 +8,14 @@ A chessboard can be represented by an 8 by 8 array. So if you are told the white queen is at `c5` (zero-indexed at column 2, row 3) and the black queen at `f2` (zero-indexed at column 5, row 6), then you know that the set-up is like so: -```text - a b c d e f g h -8 _ _ _ _ _ _ _ _ 8 -7 _ _ _ _ _ _ _ _ 7 -6 _ _ _ _ _ _ _ _ 6 -5 _ _ W _ _ _ _ _ 5 -4 _ _ _ _ _ _ _ _ 4 -3 _ _ _ _ _ _ _ _ 3 -2 _ _ _ _ _ B _ _ 2 -1 _ _ _ _ _ _ _ _ 1 - a b c d e f g h -``` +![A chess board with two queens. Arrows emanating from the queen at c5 indicate possible directions of capture along file, rank and diagonal.](https://assets.exercism.org/images/exercises/queen-attack/queen-capture.svg) You are also able to answer whether the queens can attack each other. In this case, that answer would be yes, they can, because both pieces share a diagonal. + +## Credit + +The chessboard image was made by [habere-et-dispertire][habere-et-dispertire] using LaTeX and the [chessboard package][chessboard-package] by Ulrike Fischer. + +[habere-et-dispertire]: https://exercism.org/profiles/habere-et-dispertire +[chessboard-package]: https://github.com/u-fischer/chessboard diff --git a/exercises/practice/queen-attack/.meta/config.json b/exercises/practice/queen-attack/.meta/config.json index e302d600..6e9a20cf 100644 --- a/exercises/practice/queen-attack/.meta/config.json +++ b/exercises/practice/queen-attack/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "QueenAttack.vbproj" ] }, "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.", diff --git a/exercises/practice/rail-fence-cipher/.meta/config.json b/exercises/practice/rail-fence-cipher/.meta/config.json index b5382d97..d7645dd3 100644 --- a/exercises/practice/rail-fence-cipher/.meta/config.json +++ b/exercises/practice/rail-fence-cipher/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "RailFenceCipher.vbproj" ] }, "blurb": "Implement encoding and decoding for the rail fence cipher.", diff --git a/exercises/practice/raindrops/.meta/config.json b/exercises/practice/raindrops/.meta/config.json index 56b8da78..17384034 100644 --- a/exercises/practice/raindrops/.meta/config.json +++ b/exercises/practice/raindrops/.meta/config.json @@ -11,9 +11,12 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "Raindrops.vbproj" ] }, - "blurb": "Convert a number to a string, the content of which depends on the number's factors.", + "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/rectangles/.meta/config.json b/exercises/practice/rectangles/.meta/config.json index 694a9dfc..ec498b96 100644 --- a/exercises/practice/rectangles/.meta/config.json +++ b/exercises/practice/rectangles/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "Rectangles.vbproj" ] }, "blurb": "Count the rectangles in an ASCII diagram." diff --git a/exercises/practice/resistor-color-duo/.meta/config.json b/exercises/practice/resistor-color-duo/.meta/config.json index 3fa063f3..ea8db49e 100644 --- a/exercises/practice/resistor-color-duo/.meta/config.json +++ b/exercises/practice/resistor-color-duo/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "ResistorColorDuo.vbproj" ] }, "blurb": "Convert color codes, as used on resistors, to a numeric value.", diff --git a/exercises/practice/resistor-color-trio/.meta/config.json b/exercises/practice/resistor-color-trio/.meta/config.json index 5ca3006f..596103ed 100644 --- a/exercises/practice/resistor-color-trio/.meta/config.json +++ b/exercises/practice/resistor-color-trio/.meta/config.json @@ -12,6 +12,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "ResistorColorTrio.vbproj" ] }, "blurb": "Convert color codes, as used on resistors, to a human-readable label.", diff --git a/exercises/practice/rest-api/.docs/instructions.md b/exercises/practice/rest-api/.docs/instructions.md index a2b077d5..af223ba4 100644 --- a/exercises/practice/rest-api/.docs/instructions.md +++ b/exercises/practice/rest-api/.docs/instructions.md @@ -12,27 +12,27 @@ Your task is to implement a simple [RESTful API][restful-wikipedia] that receive ```json { - "Name": "Adam", - "Owes": { + "name": "Adam", + "owes": { "Bob": 12.0, "Chuck": 4.0, "Dan": 9.5 }, - "OwedBy": { + "owed_by": { "Bob": 6.5, - "Dan": 2.75, + "Dan": 2.75 }, - "Balance": "<(total owed by other users) - (total owed to other users)>" + "balance": "<(total owed by other users) - (total owed to other users)>" } ``` ### Methods -| Description | HTTP Method | URL | Payload Format | Response w/o Payload | Response w/ Payload | -| --- | --- | --- | --- | --- | --- | -| List of user information | GET | /users | `{"users":["Adam","Bob"]}` | `{"users":}` | `{"users": (sorted by name)}` | -| Create user | POST | /add | `{"user":}` | N/A | `` | -| Create IOU | POST | /iou | `{"lender":,"borrower":,"amount":5.25}` | N/A | `{"users": and (sorted by name)>}` | +| Description | HTTP Method | URL | Payload Format | Response w/o Payload | Response w/ Payload | +| ------------------------ | ----------- | ------ | ------------------------------------------------------------------------- | -------------------------------------- | ------------------------------------------------------------------------------- | +| List of user information | GET | /users | `{"users":["Adam","Bob"]}` | `{"users":}` | `{"users": (sorted by name)}` | +| Create user | POST | /add | `{"user":}` | N/A | `` | +| Create IOU | POST | /iou | `{"lender":,"borrower":,"amount":5.25}` | N/A | `{"users": and (sorted by name)>}` | ## Other Resources @@ -44,5 +44,5 @@ Your task is to implement a simple [RESTful API][restful-wikipedia] that receive [restful-wikipedia]: https://en.wikipedia.org/wiki/Representational_state_transfer [iou]: https://en.wikipedia.org/wiki/IOU [github-rest]: https://developer.github.com/v3/ -[reddit-rest]: https://www.reddit.com/dev/api/ +[reddit-rest]: https://web.archive.org/web/20231202231149/https://www.reddit.com/dev/api/ [restfulapi]: https://restfulapi.net/ diff --git a/exercises/practice/rest-api/.meta/config.json b/exercises/practice/rest-api/.meta/config.json index a379e115..b052e5fc 100644 --- a/exercises/practice/rest-api/.meta/config.json +++ b/exercises/practice/rest-api/.meta/config.json @@ -12,6 +12,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "RestApi.vbproj" ] }, "blurb": "Implement a RESTful API for tracking IOUs." diff --git a/exercises/practice/rna-transcription/.meta/config.json b/exercises/practice/rna-transcription/.meta/config.json index 2ff919a4..92a3da51 100644 --- a/exercises/practice/rna-transcription/.meta/config.json +++ b/exercises/practice/rna-transcription/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "RnaTranscription.vbproj" ] }, "blurb": "Given a DNA strand, return its RNA Complement Transcription.", diff --git a/exercises/practice/robot-name/.meta/config.json b/exercises/practice/robot-name/.meta/config.json index 3b16dbc1..a9283529 100644 --- a/exercises/practice/robot-name/.meta/config.json +++ b/exercises/practice/robot-name/.meta/config.json @@ -12,6 +12,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "RobotName.vbproj" ] }, "blurb": "Manage robot factory settings.", diff --git a/exercises/practice/robot-simulator/.meta/config.json b/exercises/practice/robot-simulator/.meta/config.json index 265a0967..30d64de0 100644 --- a/exercises/practice/robot-simulator/.meta/config.json +++ b/exercises/practice/robot-simulator/.meta/config.json @@ -12,6 +12,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "RobotSimulator.vbproj" ] }, "blurb": "Write a robot simulator.", diff --git a/exercises/practice/roman-numerals/.meta/config.json b/exercises/practice/roman-numerals/.meta/config.json index d0dad335..d076f3db 100644 --- a/exercises/practice/roman-numerals/.meta/config.json +++ b/exercises/practice/roman-numerals/.meta/config.json @@ -12,6 +12,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "RomanNumerals.vbproj" ] }, "blurb": "Convert modern Arabic numbers into Roman numerals.", diff --git a/exercises/practice/rotational-cipher/.docs/instructions.md b/exercises/practice/rotational-cipher/.docs/instructions.md index 4dee51b3..4bf64ca1 100644 --- a/exercises/practice/rotational-cipher/.docs/instructions.md +++ b/exercises/practice/rotational-cipher/.docs/instructions.md @@ -22,8 +22,8 @@ Ciphertext is written out in the same formatting as the input including spaces a ## Examples -- ROT5 `omg` gives `trl` -- ROT0 `c` gives `c` +- ROT5 `omg` gives `trl` +- ROT0 `c` gives `c` - ROT26 `Cool` gives `Cool` - ROT13 `The quick brown fox jumps over the lazy dog.` gives `Gur dhvpx oebja sbk whzcf bire gur ynml qbt.` - ROT13 `Gur dhvpx oebja sbk whzcf bire gur ynml qbt.` gives `The quick brown fox jumps over the lazy dog.` diff --git a/exercises/practice/rotational-cipher/.meta/config.json b/exercises/practice/rotational-cipher/.meta/config.json index 5c31c1bf..be6cf3c4 100644 --- a/exercises/practice/rotational-cipher/.meta/config.json +++ b/exercises/practice/rotational-cipher/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "RotationalCipher.vbproj" ] }, "blurb": "Create an implementation of the rotational cipher, also sometimes called the Caesar cipher.", diff --git a/exercises/practice/run-length-encoding/.meta/config.json b/exercises/practice/run-length-encoding/.meta/config.json index e81ef9ac..08416dfd 100644 --- a/exercises/practice/run-length-encoding/.meta/config.json +++ b/exercises/practice/run-length-encoding/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "RunLengthEncoding.vbproj" ] }, "blurb": "Implement run-length encoding and decoding.", diff --git a/exercises/practice/saddle-points/.meta/config.json b/exercises/practice/saddle-points/.meta/config.json index 6c1604d0..59611dfd 100644 --- a/exercises/practice/saddle-points/.meta/config.json +++ b/exercises/practice/saddle-points/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "SaddlePoints.vbproj" ] }, "blurb": "Detect saddle points in a matrix.", 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 40331cb8..71f25c4d 100644 --- a/exercises/practice/say/.meta/config.json +++ b/exercises/practice/say/.meta/config.json @@ -12,6 +12,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "Say.vbproj" ] }, "blurb": "Given a number from 0 to 999,999,999,999, spell out that number in English.", diff --git a/exercises/practice/scrabble-score/.meta/config.json b/exercises/practice/scrabble-score/.meta/config.json index 41cc91fb..829bdfc7 100644 --- a/exercises/practice/scrabble-score/.meta/config.json +++ b/exercises/practice/scrabble-score/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "ScrabbleScore.vbproj" ] }, "blurb": "Given a word, compute the Scrabble score for that word.", diff --git a/exercises/practice/secret-handshake/.meta/config.json b/exercises/practice/secret-handshake/.meta/config.json index 3f01451a..eda74b45 100644 --- a/exercises/practice/secret-handshake/.meta/config.json +++ b/exercises/practice/secret-handshake/.meta/config.json @@ -11,9 +11,12 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "SecretHandshake.vbproj" ] }, "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/qt0437047" + "source_url": "https://www.imdb.com/title/tt0058331/quotes/?item=qt0437047" } diff --git a/exercises/practice/series/.docs/instructions.md b/exercises/practice/series/.docs/instructions.md index e32cc38c..fd97a670 100644 --- a/exercises/practice/series/.docs/instructions.md +++ b/exercises/practice/series/.docs/instructions.md @@ -15,5 +15,5 @@ And the following 4-digit series: And if you ask for a 6-digit series from a 5-digit string, you deserve whatever you get. -Note that these series are only required to occupy *adjacent positions* in the input; -the digits need not be *numerically consecutive*. +Note that these series are only required to occupy _adjacent positions_ in the input; +the digits need not be _numerically consecutive_. diff --git a/exercises/practice/series/.meta/config.json b/exercises/practice/series/.meta/config.json index fefda243..4ad77ce7 100644 --- a/exercises/practice/series/.meta/config.json +++ b/exercises/practice/series/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "Series.vbproj" ] }, "blurb": "Given a string of digits, output all the contiguous substrings of length `n` in that string.", diff --git a/exercises/practice/sieve/.meta/config.json b/exercises/practice/sieve/.meta/config.json index 3623723a..9d782a78 100644 --- a/exercises/practice/sieve/.meta/config.json +++ b/exercises/practice/sieve/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "Sieve.vbproj" ] }, "blurb": "Use the Sieve of Eratosthenes to find all the primes from 2 up to a given number.", diff --git a/exercises/practice/simple-cipher/.meta/config.json b/exercises/practice/simple-cipher/.meta/config.json index b99ae901..8d708326 100644 --- a/exercises/practice/simple-cipher/.meta/config.json +++ b/exercises/practice/simple-cipher/.meta/config.json @@ -12,6 +12,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "SimpleCipher.vbproj" ] }, "blurb": "Implement a simple shift cipher like Caesar and a more secure substitution cipher.", diff --git a/exercises/practice/simple-linked-list/.meta/config.json b/exercises/practice/simple-linked-list/.meta/config.json index 2caf3cf1..7972b873 100644 --- a/exercises/practice/simple-linked-list/.meta/config.json +++ b/exercises/practice/simple-linked-list/.meta/config.json @@ -12,6 +12,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "SimpleLinkedList.vbproj" ] }, "blurb": "Write a simple linked list implementation that uses Elements and a List.", 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 618544eb..20a8a4dd 100644 --- a/exercises/practice/space-age/.meta/config.json +++ b/exercises/practice/space-age/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "SpaceAge.vbproj" ] }, "blurb": "Given an age in seconds, calculate how old someone is in terms of a given planet's solar years.", diff --git a/exercises/practice/spiral-matrix/.meta/config.json b/exercises/practice/spiral-matrix/.meta/config.json index 0dafd8ea..0cf2f8ec 100644 --- a/exercises/practice/spiral-matrix/.meta/config.json +++ b/exercises/practice/spiral-matrix/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "SpiralMatrix.vbproj" ] }, "blurb": "Given the size, return a square matrix of numbers in spiral order.", diff --git a/exercises/practice/sublist/.meta/config.json b/exercises/practice/sublist/.meta/config.json index 375cf261..a42fdbed 100644 --- a/exercises/practice/sublist/.meta/config.json +++ b/exercises/practice/sublist/.meta/config.json @@ -12,6 +12,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "Sublist.vbproj" ] }, "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 5f0d3ae6..51f8e948 100644 --- a/exercises/practice/sum-of-multiples/.meta/config.json +++ b/exercises/practice/sum-of-multiples/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "SumOfMultiples.vbproj" ] }, "blurb": "Given a number, find the sum of all the multiples of particular numbers up to but not including that number.", diff --git a/exercises/practice/tournament/.meta/config.json b/exercises/practice/tournament/.meta/config.json index 526c7069..8be8bd14 100644 --- a/exercises/practice/tournament/.meta/config.json +++ b/exercises/practice/tournament/.meta/config.json @@ -12,6 +12,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "Tournament.vbproj" ] }, "blurb": "Tally the results of a small football competition." diff --git a/exercises/practice/transpose/.meta/config.json b/exercises/practice/transpose/.meta/config.json index 4498e18a..7d911dd9 100644 --- a/exercises/practice/transpose/.meta/config.json +++ b/exercises/practice/transpose/.meta/config.json @@ -11,9 +11,12 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "Transpose.vbproj" ] }, "blurb": "Take input text and output it transposed.", "source": "Reddit r/dailyprogrammer challenge #270 [Easy].", - "source_url": "https://www.reddit.com/r/dailyprogrammer/comments/4msu2x/challenge_270_easy_transpose_the_input_text" + "source_url": "https://web.archive.org/web/20230630051421/https://old.reddit.com/r/dailyprogrammer/comments/4msu2x/challenge_270_easy_transpose_the_input_text/" } diff --git a/exercises/practice/tree-building/.meta/config.json b/exercises/practice/tree-building/.meta/config.json index 5eba0bdc..0a4d6d79 100644 --- a/exercises/practice/tree-building/.meta/config.json +++ b/exercises/practice/tree-building/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "TreeBuilding.vbproj" ] }, "blurb": "Refactor a tree building algorithm." diff --git a/exercises/practice/triangle/.meta/config.json b/exercises/practice/triangle/.meta/config.json index c36c301c..382c1262 100644 --- a/exercises/practice/triangle/.meta/config.json +++ b/exercises/practice/triangle/.meta/config.json @@ -12,6 +12,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "Triangle.vbproj" ] }, "blurb": "Determine if a triangle is equilateral, isosceles, or scalene.", diff --git a/exercises/practice/twelve-days/.meta/config.json b/exercises/practice/twelve-days/.meta/config.json index f4054c28..c43fb124 100644 --- a/exercises/practice/twelve-days/.meta/config.json +++ b/exercises/practice/twelve-days/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "TwelveDays.vbproj" ] }, "blurb": "Output the lyrics to 'The Twelve Days of Christmas'.", diff --git a/exercises/practice/two-bucket/.docs/instructions.md b/exercises/practice/two-bucket/.docs/instructions.md index 7249deb3..30d779aa 100644 --- a/exercises/practice/two-bucket/.docs/instructions.md +++ b/exercises/practice/two-bucket/.docs/instructions.md @@ -11,7 +11,7 @@ There are some rules that your solution must follow: b) the second bucket is full 2. Emptying a bucket and doing nothing to the other. 3. Filling a bucket and doing nothing to the other. -- After an action, you may not arrive at a state where the starting bucket is empty and the other bucket is full. +- After an action, you may not arrive at a state where the initial starting bucket is empty and the other bucket is full. Your program will take as input: diff --git a/exercises/practice/two-bucket/.meta/config.json b/exercises/practice/two-bucket/.meta/config.json index 1b27ce01..e36d5b78 100644 --- a/exercises/practice/two-bucket/.meta/config.json +++ b/exercises/practice/two-bucket/.meta/config.json @@ -12,6 +12,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "TwoBucket.vbproj" ] }, "blurb": "Given two buckets of different size, demonstrate how to measure an exact number of liters.", diff --git a/exercises/practice/variable-length-quantity/.meta/config.json b/exercises/practice/variable-length-quantity/.meta/config.json index d3d8c0fb..be4683e9 100644 --- a/exercises/practice/variable-length-quantity/.meta/config.json +++ b/exercises/practice/variable-length-quantity/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "VariableLengthQuantity.vbproj" ] }, "blurb": "Implement variable length quantity encoding and decoding.", diff --git a/exercises/practice/word-count/.meta/config.json b/exercises/practice/word-count/.meta/config.json index 43f0a2ed..d4f23686 100644 --- a/exercises/practice/word-count/.meta/config.json +++ b/exercises/practice/word-count/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "WordCount.vbproj" ] }, "blurb": "Given a phrase, count the occurrences of each word in that phrase.", diff --git a/exercises/practice/wordy/.docs/instructions.md b/exercises/practice/wordy/.docs/instructions.md index 0b9e67b6..aafb9ee5 100644 --- a/exercises/practice/wordy/.docs/instructions.md +++ b/exercises/practice/wordy/.docs/instructions.md @@ -48,7 +48,7 @@ Since these are verbal word problems, evaluate the expression from left-to-right > What is 3 plus 2 multiplied by 3? -15 (i.e. not 9) +15 (i.e. not 9) ## Iteration 4 — Errors diff --git a/exercises/practice/wordy/.meta/config.json b/exercises/practice/wordy/.meta/config.json index 40999b74..975100f3 100644 --- a/exercises/practice/wordy/.meta/config.json +++ b/exercises/practice/wordy/.meta/config.json @@ -11,6 +11,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "Wordy.vbproj" ] }, "blurb": "Parse and evaluate simple math word problems returning the answer as an integer.", diff --git a/exercises/practice/yacht/.meta/config.json b/exercises/practice/yacht/.meta/config.json index fc54fdfb..67be7270 100644 --- a/exercises/practice/yacht/.meta/config.json +++ b/exercises/practice/yacht/.meta/config.json @@ -11,9 +11,12 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "Yacht.vbproj" ] }, "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 39923841..a5a6b917 100644 --- a/exercises/practice/zebra-puzzle/.meta/config.json +++ b/exercises/practice/zebra-puzzle/.meta/config.json @@ -12,6 +12,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "ZebraPuzzle.vbproj" ] }, "blurb": "Solve the zebra puzzle.", diff --git a/exercises/practice/zipper/.meta/config.json b/exercises/practice/zipper/.meta/config.json index 3594a3fe..0dd3514c 100644 --- a/exercises/practice/zipper/.meta/config.json +++ b/exercises/practice/zipper/.meta/config.json @@ -12,6 +12,9 @@ ], "example": [ ".meta/Example.vb" + ], + "invalidator": [ + "Zipper.vbproj" ] }, "blurb": "Creating a zipper for a binary tree."