diff --git a/config/exercise_readme.go.tmpl b/config/exercise_readme.go.tmpl
index 2b26f4942..d7b88c367 100644
--- a/config/exercise_readme.go.tmpl
+++ b/config/exercise_readme.go.tmpl
@@ -4,10 +4,13 @@
{{- with .Hints }}
{{ . }}
{{ end }}
-{{- with .TrackInsert }}
-{{ . }}
-{{ end }}
-{{- with .Spec.Credits -}}
+## Setup
+
+Go through the project setup instructions for Xcode using Swift:
+
+http://exercism.io/languages/swift
+
+{{ with .Spec.Credits }}
## Source
{{ . }}
diff --git a/docs/EXERCISE_README_INSERT.md b/docs/EXERCISE_README_INSERT.md
deleted file mode 100644
index ab6590dec..000000000
--- a/docs/EXERCISE_README_INSERT.md
+++ /dev/null
@@ -1,6 +0,0 @@
-## Setup
-
-Go through the project setup instructions for Xcode using Swift:
-
-http://exercism.io/languages/swift
-
diff --git a/exercises/accumulate/README.md b/exercises/accumulate/README.md
index 6d5129731..d6f849cbe 100644
--- a/exercises/accumulate/README.md
+++ b/exercises/accumulate/README.md
@@ -25,9 +25,6 @@ Keep your hands off that collect/map/fmap/whatchamacallit functionality
provided by your standard library!
Solve this one yourself using other basic tools instead.
-Lisp specific: it's perfectly fine to use `MAPCAR` or the equivalent,
-as this is idiomatic Lisp, not a library function.
-
## Setup
Go through the project setup instructions for Xcode using Swift:
diff --git a/exercises/acronym/README.md b/exercises/acronym/README.md
index bb3110afb..72d6c4610 100644
--- a/exercises/acronym/README.md
+++ b/exercises/acronym/README.md
@@ -7,7 +7,6 @@ Techies love their TLA (Three Letter Acronyms)!
Help generate some jargon by writing a program that converts a long name
like Portable Network Graphics to its acronym (PNG).
-
## Setup
Go through the project setup instructions for Xcode using Swift:
diff --git a/exercises/all-your-base/README.md b/exercises/all-your-base/README.md
index f426ad91f..43a890679 100644
--- a/exercises/all-your-base/README.md
+++ b/exercises/all-your-base/README.md
@@ -6,6 +6,7 @@ Implement general base conversion. Given a number in base **a**,
represented as a sequence of digits, convert it to base **b**.
## Note
+
- Try to implement the conversion yourself.
Do not use something else to perform the conversion for you.
@@ -28,7 +29,6 @@ The number 1120, *in base 3*, means:
I think you got the idea!
-
*Yes. Those three numbers above are exactly the same. Congratulations!*
## Setup
@@ -38,6 +38,5 @@ Go through the project setup instructions for Xcode using Swift:
http://exercism.io/languages/swift
-
## Submitting Incomplete Solutions
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
diff --git a/exercises/allergies/README.md b/exercises/allergies/README.md
index 9b7f3d491..ca49c5159 100644
--- a/exercises/allergies/README.md
+++ b/exercises/allergies/README.md
@@ -29,7 +29,6 @@ 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.
-
## Setup
Go through the project setup instructions for Xcode using Swift:
diff --git a/exercises/atbash-cipher/README.md b/exercises/atbash-cipher/README.md
index e693eb4a1..952d75874 100644
--- a/exercises/atbash-cipher/README.md
+++ b/exercises/atbash-cipher/README.md
@@ -9,7 +9,7 @@ letter, the second with the second-last, and so on.
An Atbash cipher for the Latin alphabet would be as follows:
-```plain
+```text
Plain: abcdefghijklmnopqrstuvwxyz
Cipher: zyxwvutsrqponmlkjihgfedcba
```
@@ -23,6 +23,7 @@ being 5 letters, and punctuation is excluded. This is to make it harder to guess
things based on word boundaries.
## Examples
+
- Encoding `test` gives `gvhg`
- Decoding `gvhg` gives `test`
- Decoding `gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt` gives `thequickbrownfoxjumpsoverthelazydog`
diff --git a/exercises/beer-song/README.md b/exercises/beer-song/README.md
index 4239b3471..84c1985a1 100644
--- a/exercises/beer-song/README.md
+++ b/exercises/beer-song/README.md
@@ -1,10 +1,10 @@
# Beer Song
-Produce the lyrics to that beloved classic, that field-trip favorite: 99 Bottles of Beer on the Wall.
+Recite the lyrics to that beloved classic, that field-trip favorite: 99 Bottles of Beer on the Wall.
Note that not all verses are identical.
-```plain
+```text
99 bottles of beer on the wall, 99 bottles of beer.
Take one down and pass it around, 98 bottles of beer on the wall.
diff --git a/exercises/binary/README.md b/exercises/binary/README.md
index 38b0f393f..20595c0f6 100644
--- a/exercises/binary/README.md
+++ b/exercises/binary/README.md
@@ -7,10 +7,12 @@ string, your program should produce a decimal output. The
program should handle invalid inputs.
## Note
+
- Implement the conversion yourself.
Do not use something else to perform the conversion for you.
## About Binary (Base-2)
+
Decimal is a base-10 system.
A number 23 in base 10 notation can be understood
diff --git a/exercises/bob/.meta/description.md b/exercises/bob/.meta/description.md
new file mode 100644
index 000000000..1072139fa
--- /dev/null
+++ b/exercises/bob/.meta/description.md
@@ -0,0 +1,10 @@
+Bob is a lackadaisical teenager. In conversation, his responses are very limited.
+
+Bob answers 'Sure.' if you ask him a question.
+
+He answers 'Whoa, chill out!' if you yell at him.
+
+He says 'Fine. Be that way!' if you address him without actually saying
+anything.
+
+He answers 'Whatever.' to anything else.
diff --git a/exercises/bowling/README.md b/exercises/bowling/README.md
index 273e09673..bfd98144f 100644
--- a/exercises/bowling/README.md
+++ b/exercises/bowling/README.md
@@ -2,19 +2,29 @@
Score a bowling game.
-Bowling is game where players roll a heavy ball to knock down pins
+Bowling is a game where players roll a heavy ball to knock down pins
arranged in a triangle. Write code to keep track of the score
of a game of bowling.
## Scoring Bowling
-The game consists of 10 frames. A frame is composed of one or two ball throws with 10 pins standing at frame initialization. There are three cases for the tabulation of a frame.
+The game consists of 10 frames. A frame is composed of one or two ball
+throws with 10 pins standing at frame initialization. There are three
+cases for the tabulation of a frame.
-* An open frame is where a score of less than 10 is recorded for the frame. In this case the score for the frame is the number of pins knocked down.
+* An open frame is where a score of less than 10 is recorded for the
+ frame. In this case the score for the frame is the number of pins
+ knocked down.
-* A spare is where all ten pins are knocked down after the second throw. The total value of a spare is 10 plus the number of pins knocked down in their next throw.
+* A spare is where all ten pins are knocked down by the second
+ throw. The total value of a spare is 10 plus the number of pins
+ knocked down in their next throw.
-* A strike is where all ten pins are knocked down after the first throw. The total value of a strike is 10 plus the number of pins knocked down in their next two throws. If a strike is immediately followed by a second strike, then we can not total the value of first strike until they throw the ball one more time.
+* A strike is where all ten pins are knocked down by the first
+ throw. The total value of a strike is 10 plus the number of pins
+ knocked down in the next two throws. If a strike is immediately
+ followed by a second strike, then the value of the first strike
+ cannot be determined until the ball is thrown one more time.
Here is a three frame example:
@@ -30,7 +40,11 @@ Frame 3 is (9 + 0) = 9
This means the current running total is 48.
-The tenth frame in the game is a special case. If someone throws a strike or a spare then they get a fill ball. Fill balls exist to calculate the total of the 10th frame. Scoring a strike or spare on the fill ball does not give the player more fill balls. The total value of the 10th frame is the total number of pins knocked down.
+The tenth frame in the game is a special case. If someone throws a
+strike or a spare then they get a fill ball. Fill balls exist to
+calculate the total of the 10th frame. Scoring a strike or spare on
+the fill ball does not give the player more fill balls. The total
+value of the 10th frame is the total number of pins knocked down.
For a tenth frame of X1/ (strike and a spare), the total value is 20.
diff --git a/exercises/circular-buffer/README.md b/exercises/circular-buffer/README.md
index 27d738225..6d380cb53 100644
--- a/exercises/circular-buffer/README.md
+++ b/exercises/circular-buffer/README.md
@@ -6,42 +6,49 @@ uses a single, fixed-size buffer as if it were connected end-to-end.
A circular buffer first starts empty and of some predefined length. For
example, this is a 7-element buffer:
-[ ][ ][ ][ ][ ][ ][ ]
+ [ ][ ][ ][ ][ ][ ][ ]
Assume that a 1 is written into the middle of the buffer (exact starting
location does not matter in a circular buffer):
-[ ][ ][ ][1][ ][ ][ ]
+ [ ][ ][ ][1][ ][ ][ ]
Then assume that two more elements are added — 2 & 3 — which get
appended after the 1:
-[ ][ ][ ][1][2][3][ ]
+ [ ][ ][ ][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][ ]
+ [ ][ ][ ][ ][ ][3][ ]
If the buffer has 7 elements then it is completely full:
-[6][7][8][9][3][4][5]
+ [6][7][8][9][3][4][5]
When the buffer is full an error will be raised, alerting the client
that further writes are blocked until a slot becomes free.
-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:
+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:
-[6][7][8][9][A][B][5]
+ [6][7][8][9][A][B][5]
-Finally, if two elements are now removed then what would be returned is
-not 3 & 4 but 5 & 6 because A & B overwrote the 3 & the 4 yielding the
-buffer with:
+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][ ]
+ [ ][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.
+
+ [D][7][8][9][A][B][C]
## Setup
@@ -49,6 +56,7 @@ Go through the project setup instructions for Xcode using Swift:
http://exercism.io/languages/swift
+
## Source
Wikipedia [http://en.wikipedia.org/wiki/Circular_buffer](http://en.wikipedia.org/wiki/Circular_buffer)
diff --git a/exercises/collatz-conjecture/README.md b/exercises/collatz-conjecture/README.md
index 78485bf69..af512fb3e 100644
--- a/exercises/collatz-conjecture/README.md
+++ b/exercises/collatz-conjecture/README.md
@@ -32,10 +32,10 @@ Go through the project setup instructions for Xcode using Swift:
http://exercism.io/languages/swift
+
## Source
An unsolved problem in mathematics named after mathematician Lothar Collatz [https://en.wikipedia.org/wiki/3x_%2B_1_problem](https://en.wikipedia.org/wiki/3x_%2B_1_problem)
## Submitting Incomplete Solutions
-
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
diff --git a/exercises/crypto-square/README.md b/exercises/crypto-square/README.md
index 214dc4da0..5fc2eaaf9 100644
--- a/exercises/crypto-square/README.md
+++ b/exercises/crypto-square/README.md
@@ -26,7 +26,7 @@ and `r` is the number of rows.
Our normalized text is 54 characters long, dictating a rectangle with
`c = 8` and `r = 7`:
-```plain
+```text
ifmanwas
meanttos
tayonthe
@@ -41,22 +41,24 @@ right.
The message above is coded as:
-```plain
+```text
imtgdvsfearwermayoogoanouuiontnnlvtwttddesaohghnsseoau
```
-Output the encoded text in chunks. Phrases that fill perfect squares
-`(r X r)` should be output in `r`-length chunks separated by spaces.
-Imperfect squares will have `n` empty spaces. Those spaces should be distributed evenly across the last `n` rows.
+Output the encoded text in chunks. Phrases that fill perfect rectangles
+`(r X c)` should be output `c` chunks of `r` length, separated by spaces.
+Phrases that do not fill perfect rectangles will have `n` empty spaces.
+Those spaces should be distributed evenly, added to the end of the last
+`n` chunks.
-```plain
-imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau
+```text
+imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau
```
Notice that were we to stack these, we could visually decode the
cyphertext back in to the original message:
-```plain
+```text
imtgdvs
fearwer
mayoogo
diff --git a/exercises/custom-set/README.md b/exercises/custom-set/README.md
index 9e5f954da..ec58e8244 100644
--- a/exercises/custom-set/README.md
+++ b/exercises/custom-set/README.md
@@ -14,6 +14,5 @@ Go through the project setup instructions for Xcode using Swift:
http://exercism.io/languages/swift
-
## Submitting Incomplete Solutions
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
diff --git a/exercises/diamond/README.md b/exercises/diamond/README.md
index 26bdcc297..1b25857d9 100644
--- a/exercises/diamond/README.md
+++ b/exercises/diamond/README.md
@@ -1,3 +1,5 @@
+# Diamond
+
The diamond kata takes as its input a letter, and outputs it in a diamond
shape. Given a letter, it prints a diamond starting with 'A', with the
supplied letter at the widest point.
@@ -56,6 +58,7 @@ Go through the project setup instructions for Xcode using Swift:
http://exercism.io/languages/swift
+
## Source
Seb Rose [http://claysnow.co.uk/recycling-tests-in-tdd/](http://claysnow.co.uk/recycling-tests-in-tdd/)
diff --git a/exercises/dominoes/README.md b/exercises/dominoes/README.md
index f9974ebf3..9b9cfcb70 100644
--- a/exercises/dominoes/README.md
+++ b/exercises/dominoes/README.md
@@ -7,10 +7,10 @@ correct domino chain (the dots on one half of a stone match the dots on the
neighbouring half of an adjacent stone) and that dots on the halfs of the stones
which don't have a neighbour (the first and last stone) match each other.
-For example given the stones `21`, `23` and `13` you should compute something
-like `12 23 31` or `32 21 13` or `13 32 21` etc, where the first and last numbers are the same.
+For example given the stones `[2|1]`, `[2|3]` and `[1|3]` you should compute something
+like `[1|2] [2|3] [3|1]` or `[3|2] [2|1] [1|3]` or `[1|3] [3|2] [2|1]` etc, where the first and last numbers are the same.
-For stones 12, 41 and 23 the resulting chain is not valid: 41 12 23's first and last numbers are not the same. 4 != 3
+For stones `[1|2]`, `[4|1]` and `[2|3]` the resulting chain is not valid: `[4|1] [1|2] [2|3]`'s first and last numbers are not the same. 4 != 3
Some test cases may use duplicate stones in a chain solution, assume that multiple Domino sets are being used.
@@ -21,6 +21,5 @@ Go through the project setup instructions for Xcode using Swift:
http://exercism.io/languages/swift
-
## Submitting Incomplete Solutions
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
diff --git a/exercises/etl/README.md b/exercises/etl/README.md
index aa46ccd38..1d47e649a 100644
--- a/exercises/etl/README.md
+++ b/exercises/etl/README.md
@@ -1,8 +1,9 @@
-# Etl
+# ETL
We are going to do the `Transform` step of an Extract-Transform-Load.
### ETL
+
Extract-Transform-Load (ETL) is a fancy way of saying, "We have some crufty, legacy data over in this system, and now we need it in this shiny new system over here, so
we're going to migrate this."
@@ -11,6 +12,7 @@ once." That's then typically followed by much forehead slapping and
moaning about how stupid we could possibly be.)
### The goal
+
We're going to extract some scrabble scores from a legacy system.
The old system stored a list of letters per score:
diff --git a/exercises/flatten-array/README.md b/exercises/flatten-array/README.md
index 52c74c978..a8bc8ac2d 100644
--- a/exercises/flatten-array/README.md
+++ b/exercises/flatten-array/README.md
@@ -3,14 +3,13 @@
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.
-
+
For Example
input: [1,[2,3,null,4],[null],5]
output: [1,2,3,4,5]
-
## Setup
Go through the project setup instructions for Xcode using Swift:
diff --git a/exercises/food-chain/README.md b/exercises/food-chain/README.md
index 1f8ca196e..f5a5beba4 100644
--- a/exercises/food-chain/README.md
+++ b/exercises/food-chain/README.md
@@ -10,7 +10,7 @@ This is a [cumulative song](http://en.wikipedia.org/wiki/Cumulative_song) of unk
This is one of many common variants.
-```plain
+```text
I know an old lady who swallowed a fly.
I don't know why she swallowed the fly. Perhaps she'll die.
diff --git a/exercises/grade-school/README.md b/exercises/grade-school/README.md
index 6d7d4f75f..7d9bed415 100644
--- a/exercises/grade-school/README.md
+++ b/exercises/grade-school/README.md
@@ -21,7 +21,6 @@ In the end, you should be able to:
Note that all our students only have one name. (It's a small town, what
do you want?)
-
## For bonus points
Did you get the tests passing and the code clean? If you want to, these
diff --git a/exercises/grains/README.md b/exercises/grains/README.md
index 0c62e380e..5c8731aa4 100644
--- a/exercises/grains/README.md
+++ b/exercises/grains/README.md
@@ -15,7 +15,6 @@ Write code that shows:
- how many grains were on each square, and
- the total number of grains
-
## For bonus points
Did you get the tests passing and the code clean? If you want to, these
diff --git a/exercises/house/README.md b/exercises/house/README.md
index 76019072c..c736617c7 100644
--- a/exercises/house/README.md
+++ b/exercises/house/README.md
@@ -1,6 +1,6 @@
# House
-Output the nursery rhyme 'This is the House that Jack Built'.
+Recite the nursery rhyme 'This is the House that Jack Built'.
> [The] process of placing a phrase of clause within another phrase of
> clause is called embedding. It is through the processes of recursion
@@ -11,10 +11,9 @@ Output the nursery rhyme 'This is the House that Jack Built'.
- [papyr.com](http://papyr.com/hypertextbooks/grammar/ph_noun.htm)
-
The nursery rhyme reads as follows:
-```plain
+```text
This is the house that Jack built.
This is the malt
diff --git a/exercises/isbn-verifier/README.md b/exercises/isbn-verifier/README.md
index 6ef0af3d8..fde045eb2 100644
--- a/exercises/isbn-verifier/README.md
+++ b/exercises/isbn-verifier/README.md
@@ -1,39 +1,55 @@
# ISBN Verifier
-Check if a given ISBN-10 is valid.
+The [ISBN-10 verification process](https://en.wikipedia.org/wiki/International_Standard_Book_Number) is used to validate book identification
+numbers. These normally contain dashes and look like: `3-598-21508-8`
-## Functionality
+## ISBN
+
+The ISBN-10 format is 9 digits (0 to 9) plus one check character (either a digit or an X only). In the case the check character is an X, this represents the value '10'. These may be communicated with or without hyphens, and can be checked for their validity by the following formula:
+
+```
+(x1 * 10 + x2 * 9 + x3 * 8 + x4 * 7 + x5 * 6 + x6 * 5 + x7 * 4 + x8 * 3 + x9 * 2 + x10 * 1) mod 11 == 0
+```
+
+If the result is 0, then it is a valid ISBN-10, otherwise it is invalid.
+
+## Example
-Given an unknown string the program should check if the provided string is a valid ISBN-10.
+Let's take the ISBN-10 `3-598-21508-8`. We plug it in to the formula, and get:
+```
+(3 * 10 + 5 * 9 + 9 * 8 + 8 * 7 + 2 * 6 + 1 * 5 + 5 * 4 + 0 * 3 + 8 * 2 + 8 * 1) mod 11 == 0
+```
+
+Since the result is 0, this proves that our ISBN is valid.
+
+## Task
+
+Given a string the program should check if the provided string is a valid ISBN-10.
Putting this into place requires some thinking about preprocessing/parsing of the string prior to calculating the check digit for the ISBN.
-The program should allow for ISBN-10 without the separating dashes to be verified as well.
+The program should be able to verify ISBN-10 both with and without separating dashes.
-## ISBN
-Let's take a random ISBN-10 number, say `3-598-21508-8` for this.
-The first digit block indicates the group where the ISBN belongs. Groups can consist of shared languages, geographic regions or countries. The leading '3' signals this ISBN is from a german speaking country.
-The following number block is to identify the publisher. Since this is a three digit publisher number there is a 5 digit title number for this book.
-The last digit in the ISBN is the check digit which is used to detect read errors.
+## Caveats
-The first 9 digits in the ISBN have to be between 0 and 9.
-The check digit can additionally be an 'X' to allow 10 to be a valid check digit as well.
+Converting from strings to numbers can be tricky in certain languages.
+Now, it's even trickier since the check digit of an ISBN-10 may be 'X' (representing '10'). For instance `3-598-21507-X` is a valid ISBN-10.
-A valid ISBN-10 is calculated with this formula `(x1 * 10 + x2 * 9 + x3 * 8 + x4 * 7 + x5 * 6 + x6 * 5 + x7 * 4 + x8 * 3 + x9 * 2 + x10 * 1) mod 11 == 0`
-So for our example ISBN this means:
-(3 * 10 + 5 * 9 + 9 * 8 + 8 * 7 + 2 * 6 + 1 * 5 + 5 * 4 + 0 * 3 + 8 * 2 + 8 * 1) mod 11 = 0
+## Bonus tasks
-Which proves that the ISBN is valid.
+* Generate a valid ISBN-13 from the input ISBN-10 (and maybe verify it again with a derived verifier).
+* Generate valid ISBN, maybe even from a given starting ISBN.
## Setup
Go through the project setup instructions for Xcode using Swift:
http://exercism.io/languages/swift
+
## Source
-Converting a string into a number and some basic processing utilizing a relatable real world example. [https://en.wikipedia.org/wiki/International_Standard_Book_Number#ISBN-10_check_digit_calculation](https://en.wikipedia.org/wiki/International_Standard_Book_Number)
+Converting a string into a number and some basic processing utilizing a relatable real world example. [https://en.wikipedia.org/wiki/International_Standard_Book_Number#ISBN-10_check_digit_calculation](https://en.wikipedia.org/wiki/International_Standard_Book_Number#ISBN-10_check_digit_calculation)
## Submitting Incomplete Solutions
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
diff --git a/exercises/isogram/README.md b/exercises/isogram/README.md
index ded4e490f..c86403fd8 100644
--- a/exercises/isogram/README.md
+++ b/exercises/isogram/README.md
@@ -2,13 +2,14 @@
Determine if a word or phrase is an isogram.
-An isogram (also known as a "nonpattern word") is a word or phrase without a repeating letter.
+An isogram (also known as a "nonpattern word") is a word or phrase without a repeating letter, however spaces and hyphens are allowed to appear multiple times.
Examples of isograms:
- lumberjacks
- background
- downstream
+- six-year-old
The word *isograms*, however, is not an isogram, because the s repeats.
diff --git a/exercises/kindergarten-garden/README.md b/exercises/kindergarten-garden/README.md
index ae8007392..5593833c9 100644
--- a/exercises/kindergarten-garden/README.md
+++ b/exercises/kindergarten-garden/README.md
@@ -3,19 +3,19 @@
Given a diagram, determine which plants each child in the kindergarten class is
responsible for.
-The kindergarten class is learning about growing plants. The teachers
+The kindergarten class is learning about growing plants. The teacher
thought it would be a good idea to give them actual seeds, plant them in
actual dirt, and grow actual plants.
They've chosen to grow grass, clover, radishes, and violets.
-To this end, they've put little styrofoam cups along the window sills,
-and planted one type of plant in each cup, choosing randomly from the
-available types of seeds.
+To this end, the children have put little cups along the window sills, and
+planted one type of plant in each cup, choosing randomly from the available
+types of seeds.
-```plain
+```text
[window][window][window]
-........................ # each dot represents a styrofoam cup
+........................ # each dot represents a cup
........................
```
@@ -25,27 +25,27 @@ There are 12 children in the class:
- Eve, Fred, Ginny, Harriet,
- Ileana, Joseph, Kincaid, and Larry.
-Each child gets 4 cups, two on each row. The children are assigned to
-cups in alphabetical order.
+Each child gets 4 cups, two on each row. Their teacher assigns cups to
+the children alphabetically by their names.
The following diagram represents Alice's plants:
-```plain
+```text
[window][window][window]
VR......................
RG......................
```
-So in the row nearest the window, she has a violet and a radish; in the
-row behind that, she has a radish and some grass.
+In the first row, nearest the windows, she has a violet and a radish. In the
+second row she has a radish and some grass.
Your program will be given the plants from left-to-right starting with
the row nearest the windows. From this, it should be able to determine
-which plants belong to which students.
+which plants belong to each student.
For example, if it's told that the garden looks like so:
-```plain
+```text
[window][window][window]
VRCGVVRVCGGCCGVRGCVCGCGV
VRCCCGCRRGVCGCRVVCVGCGCV
diff --git a/exercises/leap/README.md b/exercises/leap/README.md
index a8db31583..d134e862f 100644
--- a/exercises/leap/README.md
+++ b/exercises/leap/README.md
@@ -4,7 +4,7 @@ Given a year, report if it is a leap year.
The tricky thing here is that a leap year in the Gregorian calendar occurs:
-```plain
+```text
on every year that is evenly divisible by 4
except every year that is evenly divisible by 100
unless the year is also evenly divisible by 400
diff --git a/exercises/linked-list/README.md b/exercises/linked-list/README.md
index 029832f5d..cc998b859 100644
--- a/exercises/linked-list/README.md
+++ b/exercises/linked-list/README.md
@@ -2,18 +2,18 @@
Implement a doubly linked list.
-Like an array, a linked list is a simple linear data structure. Several
-common data types can be implemented using linked lists, like queues,
+Like an array, a linked list is a simple linear data structure. Several
+common data types can be implemented using linked lists, like queues,
stacks, and associative arrays.
-A linked list is a collection of data elements called *nodes*. In a
-*singly linked list* each node holds a value and a link to the next node.
-In a *doubly linked list* each node also holds a link to the previous
+A linked list is a collection of data elements called *nodes*. In a
+*singly linked list* each node holds a value and a link to the next node.
+In a *doubly linked list* each node also holds a link to the previous
node.
-You will write an implementation of a doubly linked list. Implement a
-Node to hold a value and pointers to the next and previous nodes. Then
-implement a List which holds references to the first and last node and
+You will write an implementation of a doubly linked list. Implement a
+Node to hold a value and pointers to the next and previous nodes. Then
+implement a List which holds references to the first and last node and
offers an array-like interface for adding and removing items:
* `push` (*insert value at back*);
@@ -21,8 +21,8 @@ offers an array-like interface for adding and removing items:
* `shift` (*remove value at front*).
* `unshift` (*insert value at front*);
-To keep your implementation simple, the tests will not cover error
-conditions. Specifically: `pop` or `shift` will never be called on an
+To keep your implementation simple, the tests will not cover error
+conditions. Specifically: `pop` or `shift` will never be called on an
empty list.
If you want to know more about linked lists, check [Wikipedia](https://en.wikipedia.org/wiki/Linked_list).
diff --git a/exercises/list-ops/README.md b/exercises/list-ops/README.md
index cc2e70045..5b8634beb 100644
--- a/exercises/list-ops/README.md
+++ b/exercises/list-ops/README.md
@@ -12,5 +12,6 @@ Go through the project setup instructions for Xcode using Swift:
http://exercism.io/languages/swift
+
## Submitting Incomplete Solutions
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
diff --git a/exercises/luhn/README.md b/exercises/luhn/README.md
index 2e55aff73..3b6a09924 100644
--- a/exercises/luhn/README.md
+++ b/exercises/luhn/README.md
@@ -18,27 +18,27 @@ are disallowed.
## Example 1: valid credit card number
-```
+```text
4539 1488 0343 6467
```
The first step of the Luhn algorithm is to double every second digit,
starting from the right. We will be doubling
-```
+```text
4_3_ 1_8_ 0_4_ 6_6_
```
If doubling the number results in a number greater than 9 then subtract 9
from the product. The results of our doubling:
-```
+```text
8569 2478 0383 3437
```
Then sum all of the digits:
-```
+```text
8+5+6+9+2+4+7+8+0+3+8+3+3+4+3+7 = 80
```
@@ -46,19 +46,19 @@ If the sum is evenly divisible by 10, then the number is valid. This number is v
## Example 2: invalid credit card number
-```
+```text
8273 1232 7352 0569
```
Double the second digits, starting from the right
-```
+```text
7253 2262 5312 0539
```
Sum the digits
-```
+```text
7+2+5+3+2+2+6+2+5+3+1+2+0+5+3+9 = 57
```
diff --git a/exercises/matrix/README.md b/exercises/matrix/README.md
index 3679a2b4a..304df4092 100644
--- a/exercises/matrix/README.md
+++ b/exercises/matrix/README.md
@@ -5,13 +5,15 @@ that matrix.
So given a string with embedded newlines like:
-> 9 8 7
-> 5 3 2
-> 6 6 7
+```text
+9 8 7
+5 3 2
+6 6 7
+```
representing this matrix:
-```plain
+```text
0 1 2
|---------
0 | 9 8 7
diff --git a/exercises/meetup/README.md b/exercises/meetup/README.md
index 2e989ad39..ff80efafd 100644
--- a/exercises/meetup/README.md
+++ b/exercises/meetup/README.md
@@ -2,26 +2,29 @@
Calculate the date of meetups.
-Typically meetups happen on the same day of the week. In this exercise, you will take
-a description of a meetup date, and return the actual meetup date.
+Typically meetups happen on the same day of the week. In this exercise, you
+will take a description of a meetup date, and return the actual meetup date.
Examples of general descriptions are:
-- the first Monday of January 2017
-- the third Tuesday of January 2017
-- the Wednesteenth of January 2017
-- the last Thursday of January 2017
+- The first Monday of January 2017
+- The third Tuesday of January 2017
+- The wednesteenth of January 2017
+- The last Thursday of January 2017
-Note that "Monteenth", "Tuesteenth", etc are all made up words. There
-was a meetup whose members realized that there are exactly 7 numbered days in a month that
-end in '-teenth'. Therefore, one is guaranteed that each day of the week
+The descriptors you are expected to parse are:
+first, second, third, fourth, fifth, last, monteenth, tuesteenth, wednesteenth,
+thursteenth, friteenth, saturteenth, sunteenth
+
+Note that "monteenth", "tuesteenth", etc are all made up words. There was a
+meetup whose members realized that there are exactly 7 numbered days in a month
+that end in '-teenth'. Therefore, one is guaranteed that each day of the week
(Monday, Tuesday, ...) will have exactly one date that is named with '-teenth'
in every month.
-Given examples of a meetup dates, each containing a month, day, year, and descriptor
-(first, second, teenth, etc), calculate the date of the actual meetup.
-For example, if given "First Monday of January 2017", the correct meetup date is 2017/1/2
-
+Given examples of a meetup dates, each containing a month, day, year, and
+descriptor calculate the date of the actual meetup. For example, if given
+"The first Monday of January 2017", the correct meetup date is 2017/1/2.
## Setup
diff --git a/exercises/minesweeper/README.md b/exercises/minesweeper/README.md
index 0377906be..b423c1bd5 100644
--- a/exercises/minesweeper/README.md
+++ b/exercises/minesweeper/README.md
@@ -33,6 +33,5 @@ Go through the project setup instructions for Xcode using Swift:
http://exercism.io/languages/swift
-
## Submitting Incomplete Solutions
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
diff --git a/exercises/nucleotide-count/README.md b/exercises/nucleotide-count/README.md
index 4bfe5b2b4..b7e80fc5e 100644
--- a/exercises/nucleotide-count/README.md
+++ b/exercises/nucleotide-count/README.md
@@ -1,30 +1,16 @@
# Nucleotide Count
-Given a DNA string, compute how many times each nucleotide occurs in the string.
+Given a single stranded DNA string, compute how many times each nucleotide occurs in the string.
-DNA is represented by an alphabet of the following symbols: 'A', 'C',
-'G', and 'T'.
-
-Each symbol represents a nucleotide, which is a fancy name for the
-particular molecules that happen to make up a large part of DNA.
-
-Shortest intro to biochemistry EVAR:
+The genetic language of every living thing on the planet is DNA.
+DNA is a large molecule that is built from an extremely long sequence of individual elements called nucleotides.
+4 types exist in DNA and these differ only slightly and can be represented as the following symbols: 'A' for adenine, 'C' for cytosine, 'G' for guanine, and 'T' thymine.
+Here is an analogy:
- twigs are to birds nests as
-- nucleotides are to DNA and RNA as
-- amino acids are to proteins as
-- sugar is to starch as
-- oh crap lipids
-
-I'm not going to talk about lipids because they're crazy complex.
-
-So back to nucleotides.
-
-DNA contains four types of them: adenine (`A`), cytosine (`C`), guanine
-(`G`), and thymine (`T`).
-
-RNA contains a slightly different set of nucleotides, but we don't care
-about that for now.
+- nucleotides are to DNA as
+- legos are to lego houses as
+- words are to sentences as...
## Setup
diff --git a/exercises/ocr-numbers/README.md b/exercises/ocr-numbers/README.md
index 4a321327f..612ce9981 100644
--- a/exercises/ocr-numbers/README.md
+++ b/exercises/ocr-numbers/README.md
@@ -1,4 +1,4 @@
-# Ocr Numbers
+# OCR Numbers
Given a 3 x 4 grid of pipes, underscores, and spaces, determine which number is
represented, or whether it is garbled.
@@ -9,7 +9,7 @@ To begin with, convert a simple binary font to a string containing 0 or 1.
The binary font uses pipes and underscores, four rows high and three columns wide.
-```
+```text
_ #
| | # zero.
|_| #
@@ -18,7 +18,7 @@ The binary font uses pipes and underscores, four rows high and three columns wid
Is converted to "0"
-```
+```text
#
| # one.
| #
@@ -39,7 +39,7 @@ Update your program to recognize multi-character binary strings, replacing garbl
Update your program to recognize all numbers 0 through 9, both individually and as part of a larger string.
-```
+```text
_
_|
|_
@@ -48,7 +48,7 @@ Update your program to recognize all numbers 0 through 9, both individually and
Is converted to "2"
-```
+```text
_ _ _ _ _ _ _ _ #
| _| _||_||_ |_ ||_||_|| | # decimal numbers.
||_ _| | _||_| ||_| _||_| #
@@ -61,7 +61,7 @@ Is converted to "1234567890"
Update your program to handle multiple numbers, one per line. When converting several lines, join the lines with commas.
-```
+```text
_ _
| _| _|
||_ _|
diff --git a/exercises/octal/README.md b/exercises/octal/README.md
index 2bf587fce..0582708da 100644
--- a/exercises/octal/README.md
+++ b/exercises/octal/README.md
@@ -8,11 +8,13 @@ Implement octal to decimal conversion. Given an octal input
string, your program should produce a decimal output.
## Note
+
- Implement the conversion yourself.
Do not use something else to perform the conversion for you.
- Treat invalid input as octal 0.
## About Octal (Base-8)
+
Decimal is a base-10 system.
A number 233 in base 10 notation can be understood
@@ -25,7 +27,8 @@ as a linear combination of powers of 10:
- All these values are summed.
So:
-```
+
+```text
233 # decimal
= 2*10^2 + 3*10^1 + 3*10^0
= 2*100 + 3*10 + 3*1
@@ -34,7 +37,8 @@ So:
Octal is similar, but uses powers of 8 rather than powers of 10.
So:
-```
+
+```text
233 # octal
= 2*8^2 + 3*8^1 + 3*8^0
= 2*64 + 3*8 + 3*1
diff --git a/exercises/palindrome-products/README.md b/exercises/palindrome-products/README.md
index 063b8cd20..c4a731e62 100644
--- a/exercises/palindrome-products/README.md
+++ b/exercises/palindrome-products/README.md
@@ -5,33 +5,32 @@ Detect palindrome products in a given range.
A palindromic number is a number that remains the same when its digits are
reversed. For example, `121` is a palindromic number but `112` is not.
-Given the definition of a palindromic number, we define a palindrome _product_
-to be the product `c`, such that `a * b = c`, where `c` is a palindromic number and
- `a` and `b` are integers (possibly, but _not_ necessarily palindromic numbers).
+Given a range of numbers, find the largest and smallest palindromes which
+are products of numbers within that range.
-For example, the palindromic number 9009 can be written as the palindrome
-product: `91 * 99 = 9009`.
-
-It's possible (and indeed common) for a palindrome product to be the product
-of multiple combinations of numbers. For example, the palindrome product `9` has
-the factors `(1, 9)`, `(3, 3)`, and `(9, 1)`.
-
-Write a program that given a range of integers, returns the smallest and largest
-palindromic product within that range, along with all of it's factors.
+Your solution should return the largest and smallest palindromes, along with the
+factors of each within the range. If the largest or smallest palindrome has more
+than one pair of factors within the range, then return all the pairs.
## Example 1
Given the range `[1, 9]` (both inclusive)...
-The smallest product is `1`. It's factors are `(1, 1)`.
-The largest product is `9`. It's factors are `(1, 9)`, `(3, 3)`, and `(9, 1)`.
+And given the list of all possible products within this range:
+`[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 15, 21, 24, 27, 20, 28, 32, 36, 25, 30, 35, 40, 45, 42, 48, 54, 49, 56, 63, 64, 72, 81]`
+
+The palindrome products are all single digit numbers (in this case):
+`[1, 2, 3, 4, 5, 6, 7, 8, 9]`
+
+The smallest palindrome product is `1`. Its factors are `(1, 1)`.
+The largest palindrome product is `9`. Its factors are `(1, 9)` and `(3, 3)`.
## Example 2
Given the range `[10, 99]` (both inclusive)...
-The smallest palindrome product is `121`. It's factors are `(11, 11)`.
-The largest palindrome product is `9009`. It's factors are `(91, 99)` and `(99, 91)`.
+The smallest palindrome product is `121`. Its factors are `(11, 11)`.
+The largest palindrome product is `9009`. Its factors are `(91, 99)`.
## Setup
diff --git a/exercises/pangram/README.md b/exercises/pangram/README.md
index 21b3a1118..030dfb274 100644
--- a/exercises/pangram/README.md
+++ b/exercises/pangram/README.md
@@ -2,7 +2,7 @@
Determine if a sentence is a pangram. A pangram (Greek: παν γράμμα, pan gramma,
"every letter") is a sentence using every letter of the alphabet at least once.
-The best known English pangram is:
+The best known English pangram is:
> The quick brown fox jumps over the lazy dog.
The alphabet used consists of ASCII letters `a` to `z`, inclusive, and is case
diff --git a/exercises/pascals-triangle/README.md b/exercises/pascals-triangle/README.md
index 4a0a549ec..c0d9e14f2 100644
--- a/exercises/pascals-triangle/README.md
+++ b/exercises/pascals-triangle/README.md
@@ -1,11 +1,11 @@
-# Pascals Triangle
+# Pascal's Triangle
Compute Pascal's triangle up to a given number of rows.
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.
-```plain
+```text
1
1 1
1 2 1
diff --git a/exercises/perfect-numbers/README.md b/exercises/perfect-numbers/README.md
index 2db38b4ce..063f7d466 100644
--- a/exercises/perfect-numbers/README.md
+++ b/exercises/perfect-numbers/README.md
@@ -5,7 +5,7 @@ Nicomachus' (60 - 120 CE) classification scheme for natural numbers.
The Greek mathematician [Nicomachus](https://en.wikipedia.org/wiki/Nicomachus) devised a classification scheme for natural numbers, identifying each as belonging uniquely to the categories of **perfect**, **abundant**, or **deficient** based on their [aliquot sum](https://en.wikipedia.org/wiki/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
+- **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
@@ -14,7 +14,7 @@ The Greek mathematician [Nicomachus](https://en.wikipedia.org/wiki/Nicomachus) d
- **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**.
## Setup
diff --git a/exercises/phone-number/README.md b/exercises/phone-number/README.md
index fda67fc34..3b11f0186 100644
--- a/exercises/phone-number/README.md
+++ b/exercises/phone-number/README.md
@@ -6,14 +6,15 @@ The **North American Numbering Plan (NANP)** is a telephone numbering system use
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
```
+
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 formated telephone numbers by removing punctuation and the country code (1) if present.
+Your task is to clean up differently formatted telephone numbers by removing punctuation and the country code (1) if present.
For example, the inputs
- `+1 (613)-995-0253`
diff --git a/exercises/protein-translation/README.md b/exercises/protein-translation/README.md
index 249350583..d8c256153 100644
--- a/exercises/protein-translation/README.md
+++ b/exercises/protein-translation/README.md
@@ -14,17 +14,17 @@ Protein: `"Methionine", "Phenylalanine", "Serine"`
There are 64 codons which in turn correspond to 20 amino acids; however, all of the codon sequences and resulting amino acids are not important in this exercise. If it works for one codon, the program should work for all of them.
However, feel free to expand the list in the test suite to include them all.
-There are also four terminating codons (also known as 'STOP' codons); if any of these codons are encountered (by the ribosome), all translation ends and the protein is terminated.
+There are also three terminating codons (also known as 'STOP' codons); if any of these codons are encountered (by the ribosome), all translation ends and the protein is terminated.
All subsequent codons after are ignored, like this:
RNA: `"AUGUUUUCUUAAAUG"` =>
-Codons: `"AUG", "UUU", "UCU", "UAG", "AUG"` =>
+Codons: `"AUG", "UUU", "UCU", "UAA", "AUG"` =>
Protein: `"Methionine", "Phenylalanine", "Serine"`
-Note the stop codon terminates the translation and the final methionine is not translated into the protein sequence.
+Note the stop codon `"UAA"` terminates the translation and the final methionine is not translated into the protein sequence.
Below are the codons and resulting Amino Acids needed for the exercise.
@@ -39,7 +39,6 @@ UGU, UGC | Cysteine
UGG | Tryptophan
UAA, UAG, UGA | STOP
-
Learn more about [protein translation on Wikipedia](http://en.wikipedia.org/wiki/Translation_(biology))
## Setup
@@ -48,6 +47,7 @@ Go through the project setup instructions for Xcode using Swift:
http://exercism.io/languages/swift
+
## Source
Tyler Long
diff --git a/exercises/pythagorean-triplet/README.md b/exercises/pythagorean-triplet/README.md
index 048c597a3..31bdf4b5c 100644
--- a/exercises/pythagorean-triplet/README.md
+++ b/exercises/pythagorean-triplet/README.md
@@ -3,13 +3,13 @@
A Pythagorean triplet is a set of three natural numbers, {a, b, c}, for
which,
-```
+```text
a**2 + b**2 = c**2
```
-For example,
+For example,
-```
+```text
3**2 + 4**2 = 9 + 16 = 25 = 5**2.
```
diff --git a/exercises/queen-attack/README.md b/exercises/queen-attack/README.md
index 4438d9bbb..313e4fbf1 100644
--- a/exercises/queen-attack/README.md
+++ b/exercises/queen-attack/README.md
@@ -11,7 +11,7 @@ A chessboard can be represented by an 8 by 8 array.
So if you're told the white queen is at (2, 3) and the black queen at
(5, 6), then you'd know you've got a set-up like so:
-```plain
+```text
_ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _
_ _ _ W _ _ _ _
diff --git a/exercises/rna-transcription/README.md b/exercises/rna-transcription/README.md
index eef0e2189..df588a11a 100644
--- a/exercises/rna-transcription/README.md
+++ b/exercises/rna-transcription/README.md
@@ -1,4 +1,4 @@
-# Rna Transcription
+# RNA Transcription
Given a DNA strand, return its RNA complement (per RNA transcription).
@@ -27,7 +27,7 @@ http://exercism.io/languages/swift
## Source
-Rosalind [http://rosalind.info/problems/rna](http://rosalind.info/problems/rna)
+Hyperphysics [http://hyperphysics.phy-astr.gsu.edu/hbase/Organic/transcription.html](http://hyperphysics.phy-astr.gsu.edu/hbase/Organic/transcription.html)
## Submitting Incomplete Solutions
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
diff --git a/exercises/roman-numerals/README.md b/exercises/roman-numerals/README.md
index a43f05b69..4adcca5b6 100644
--- a/exercises/roman-numerals/README.md
+++ b/exercises/roman-numerals/README.md
@@ -14,7 +14,7 @@ The Romans wrote numbers using letters - I, V, X, L, C, D, M. (notice
these letters have lots of straight lines and are hence easy to hack
into stone tablets).
-```
+```text
1 => I
10 => X
7 => VII
diff --git a/exercises/run-length-encoding/README.md b/exercises/run-length-encoding/README.md
index 99db8066d..48405c638 100644
--- a/exercises/run-length-encoding/README.md
+++ b/exercises/run-length-encoding/README.md
@@ -7,20 +7,20 @@ Run-length encoding (RLE) is a simple form of data compression, where runs
For example we can represent the original 53 characters with only 13.
-```
+```text
"WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB" -> "12WB12W3B24WB"
```
RLE allows the original data to be perfectly reconstructed from
the compressed data, which makes it a lossless data compression.
-```
+```text
"AABCCCDEEEE" -> "2AB3CD4E" -> "AABCCCDEEEE"
```
For simplicity, you can assume that the unencoded string will only contain
-the letters A through Z (either lower or upper case) and whitespace. This way
-data to be encoded will never contain any numbers and numbers inside data to
+the letters A through Z (either lower or upper case) and whitespace. This way
+data to be encoded will never contain any numbers and numbers inside data to
be decoded always represent the count for the following character.
## Setup
diff --git a/exercises/saddle-points/README.md b/exercises/saddle-points/README.md
index ce145d1f8..71ddaf2fd 100644
--- a/exercises/saddle-points/README.md
+++ b/exercises/saddle-points/README.md
@@ -4,7 +4,7 @@ Detect saddle points in a matrix.
So say you have a matrix like so:
-```plain
+```text
0 1 2
|---------
0 | 9 8 7
@@ -15,7 +15,7 @@ So say you have a matrix like so:
It has a saddle point at (1, 0).
It's called a "saddle point" because it is greater than or equal to
-every element in its row and the less than or equal to every element in
+every element in its row and less than or equal to every element in
its column.
A matrix may have zero or more saddle points.
diff --git a/exercises/say/README.md b/exercises/say/README.md
index 8d84c0284..e4674efb7 100644
--- a/exercises/say/README.md
+++ b/exercises/say/README.md
@@ -68,10 +68,10 @@ Go through the project setup instructions for Xcode using Swift:
http://exercism.io/languages/swift
+
## Source
A variation on JavaRanch CattleDrive, exercise 4a [http://www.javaranch.com/say.jsp](http://www.javaranch.com/say.jsp)
## Submitting Incomplete Solutions
-
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
diff --git a/exercises/scrabble-score/README.md b/exercises/scrabble-score/README.md
index 1cb5a4da2..89b05d839 100644
--- a/exercises/scrabble-score/README.md
+++ b/exercises/scrabble-score/README.md
@@ -6,7 +6,7 @@ Given a word, compute the scrabble score for that word.
You'll need these:
-```plain
+```text
Letter Value
A, E, I, O, U, L, N, R, S, T 1
D, G 2
@@ -18,6 +18,7 @@ Q, Z 10
```
## Examples
+
"cabbage" should be scored as worth 14 points:
- 3 points for C
@@ -34,6 +35,7 @@ And to total:
- = 14
## Extensions
+
- You can play a double or a triple letter.
- You can play a double or a triple word.
diff --git a/exercises/secret-handshake/README.md b/exercises/secret-handshake/README.md
index 51066071e..9fb10843b 100644
--- a/exercises/secret-handshake/README.md
+++ b/exercises/secret-handshake/README.md
@@ -6,7 +6,7 @@
You and your fellow cohort of those in the "know" when it comes to
binary decide to come up with a secret "handshake".
-```
+```text
1 = wink
10 = double blink
100 = close your eyes
@@ -37,7 +37,7 @@ http://exercism.io/languages/swift
## Source
-Bert, in Mary Poppins [http://www.imdb.com/character/ch0011238/quotes](http://www.imdb.com/character/ch0011238/quotes)
+Bert, in Mary Poppins [http://www.imdb.com/title/tt0058331/quotes/qt0437047](http://www.imdb.com/title/tt0058331/quotes/qt0437047)
## Submitting Incomplete Solutions
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
diff --git a/exercises/simple-cipher/README.md b/exercises/simple-cipher/README.md
index 7ebbed905..9e909c37c 100644
--- a/exercises/simple-cipher/README.md
+++ b/exercises/simple-cipher/README.md
@@ -47,7 +47,7 @@ Given the key "aaaaaaaaaaaaaaaaaa", encoding the string "iamapandabear"
would return the original "iamapandabear".
Given the key "ddddddddddddddddd", encoding our string "iamapandabear"
-would return the obscured "lpdsdqgdehdu"
+would return the obscured "ldpdsdqgdehdu"
In the example above, we've set a = 0 for the key value. So when the
plaintext is added to the key, we end up with the same message coming
@@ -58,15 +58,13 @@ would get the same thing as the Caesar Cipher.
The weakest link in any cipher is the human being. Let's make your
substitution cipher a little more fault tolerant by providing a source
-of randomness and ensuring that the key is not composed of numbers or
-capital letters.
+of randomness and ensuring that the key contains only lowercase letters.
If someone doesn't submit a key at all, generate a truly random key of
-at least 100 characters in length, accessible via Cipher#key (the #
-syntax means instance variable)
+at least 100 characters in length.
-If the key submitted has capital letters or numbers, throw an
-ArgumentError with a message to that effect.
+If the key submitted is not composed only of lowercase letters, your
+solution should handle the error in a language-appropriate way.
## Extensions
diff --git a/exercises/space-age/README.md b/exercises/space-age/README.md
index 787c9b90a..eff747181 100644
--- a/exercises/space-age/README.md
+++ b/exercises/space-age/README.md
@@ -12,7 +12,7 @@ Given an age in seconds, calculate how old someone would be on:
- Neptune: orbital period 164.79132 Earth years
So if you were told someone were 1,000,000,000 seconds old, you should
-be able to say that they're 31 Earth-years old.
+be able to say that they're 31.69 Earth-years old.
If you're wondering why Pluto didn't make the cut, go watch [this
youtube video](http://www.youtube.com/watch?v=Z_2gbGXzFbs).
diff --git a/exercises/sublist/README.md b/exercises/sublist/README.md
index ef9d876c9..331d67819 100644
--- a/exercises/sublist/README.md
+++ b/exercises/sublist/README.md
@@ -24,6 +24,5 @@ Go through the project setup instructions for Xcode using Swift:
http://exercism.io/languages/swift
-
## Submitting Incomplete Solutions
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
diff --git a/exercises/sum-of-multiples/README.md b/exercises/sum-of-multiples/README.md
index d25004f90..9350d7ad9 100644
--- a/exercises/sum-of-multiples/README.md
+++ b/exercises/sum-of-multiples/README.md
@@ -1,16 +1,13 @@
# Sum Of Multiples
-Given a number, find the sum of all the multiples of particular numbers up to
+Given a number, find the sum of all the unique multiples of particular numbers up to
but not including that number.
-If we list all the natural numbers up to but not including 20 that are
-multiples of either 3 or 5, we get 3, 5, 6 and 9, 10, 12, 15, and 18.
+If we list all the natural numbers below 20 that are multiples of 3 or 5,
+we get 3, 5, 6, 9, 10, 12, 15, and 18.
The sum of these multiples is 78.
-Given a number, find the sum of the multiples of a given set of numbers,
-up to but not including that number.
-
## Setup
Go through the project setup instructions for Xcode using Swift:
diff --git a/exercises/tournament/README.md b/exercises/tournament/README.md
index 6ed1ae6d6..bc2bbd46d 100644
--- a/exercises/tournament/README.md
+++ b/exercises/tournament/README.md
@@ -5,7 +5,7 @@ Tally the results of a small football competition.
Based on an input file containing which team played against which and what the
outcome was, create a file with a table like this:
-```
+```text
Team | MP | W | D | L | P
Devastating Donkeys | 3 | 2 | 1 | 0 | 7
Allegoric Alaskans | 3 | 2 | 0 | 1 | 6
@@ -31,7 +31,7 @@ Input
Your tallying program will receive input that looks like:
-```
+```text
Allegoric Alaskans;Blithering Badgers;win
Devastating Donkeys;Courageous Californians;draw
Devastating Donkeys;Allegoric Alaskans;win
@@ -42,7 +42,7 @@ Allegoric Alaskans;Courageous Californians;win
The result of the match refers to the first team listed. So this line
-```
+```text
Allegoric Alaskans;Blithering Badgers;win
```
@@ -50,7 +50,7 @@ Means that the Allegoric Alaskans beat the Blithering Badgers.
This line:
-```
+```text
Courageous Californians;Blithering Badgers;loss
```
@@ -58,7 +58,7 @@ Means that the Blithering Badgers beat the Courageous Californians.
And this line:
-```
+```text
Devastating Donkeys;Courageous Californians;draw
```
@@ -71,6 +71,5 @@ Go through the project setup instructions for Xcode using Swift:
http://exercism.io/languages/swift
-
## Submitting Incomplete Solutions
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
diff --git a/exercises/transpose/README.md b/exercises/transpose/README.md
index 6e8162399..eea40636a 100644
--- a/exercises/transpose/README.md
+++ b/exercises/transpose/README.md
@@ -4,14 +4,14 @@ Given an input text output it transposed.
Roughly explained, the transpose of a matrix:
-```
+```text
ABC
DEF
```
is given by:
-```
+```text
AD
BE
CF
@@ -26,14 +26,14 @@ If the input has rows of different lengths, this is to be solved as follows:
Therefore, transposing this matrix:
-```
+```text
ABC
DE
```
results in:
-```
+```text
AD
BE
C
@@ -41,21 +41,21 @@ C
And transposing:
-```
+```text
AB
DEF
```
results in:
-```
+```text
AD
BE
F
```
In general, all characters from the input should also be present in the transposed output.
-That means that if a column in the input text contains only spaces on its bottom-most row(s),
+That means that if a column in the input text contains only spaces on its bottom-most row(s),
the corresponding output row should contain the spaces in its right-most column(s).
## Setup
diff --git a/exercises/triangle/README.md b/exercises/triangle/README.md
index ce71ef1d1..a0a89024a 100644
--- a/exercises/triangle/README.md
+++ b/exercises/triangle/README.md
@@ -2,23 +2,26 @@
Determine if a triangle is equilateral, isosceles, or scalene.
-An _equilateral_ triangle has all three sides the same length.
+An _equilateral_ triangle has all three sides the same length.
+
An _isosceles_ triangle has at least two sides the same length. (It is sometimes
specified as having exactly two sides the same length, but for the purposes of
-this exercise we'll say at least two.)
+this exercise we'll say at least two.)
+
A _scalene_ triangle has all sides of different lengths.
## Note
-For a shape to be a triangle at all, all sides have to be of length > 0, and
-the sum of the lengths of any two sides must be greater than or equal to the
+For a shape to be a triangle at all, all sides have to be of length > 0, and
+the sum of the lengths of any two sides must be greater than or equal to the
length of the third side. See [Triangle Inequality](https://en.wikipedia.org/wiki/Triangle_inequality).
## Dig Deeper
-The case where the sum of the lengths of two sides _equals_ that of the
-third is known as a _degenerate_ triangle - it has zero area and looks like
+The case where the sum of the lengths of two sides _equals_ that of the
+third is known as a _degenerate_ triangle - it has zero area and looks like
a single line. Feel free to add your own code/tests to check for degenerate triangles.
+
## Setup
Go through the project setup instructions for Xcode using Swift:
diff --git a/exercises/trinary/README.md b/exercises/trinary/README.md
index 9c54b72d0..4d435a517 100644
--- a/exercises/trinary/README.md
+++ b/exercises/trinary/README.md
@@ -11,7 +11,7 @@ Trinary numbers contain three symbols: 0, 1, and 2.
The last place in a trinary number is the 1's place. The second to last
is the 3's place, the third to last is the 9's place, etc.
-```bash
+```shell
# "102012"
1 0 2 0 1 2 # the number
1*3^5 + 0*3^4 + 2*3^3 + 0*3^2 + 1*3^1 + 2*3^0 # the value
diff --git a/exercises/twelve-days/README.md b/exercises/twelve-days/README.md
index 0cb52474d..3679bcbf0 100644
--- a/exercises/twelve-days/README.md
+++ b/exercises/twelve-days/README.md
@@ -2,7 +2,7 @@
Output the lyrics to 'The Twelve Days of Christmas'.
-```
+```text
On the first day of Christmas my true love gave to me, a Partridge in a Pear Tree.
On the second day of Christmas my true love gave to me, two Turtle Doves, and a Partridge in a Pear Tree.
diff --git a/exercises/two-fer/README.md b/exercises/two-fer/README.md
index 879bbc7e8..dda41031e 100644
--- a/exercises/two-fer/README.md
+++ b/exercises/two-fer/README.md
@@ -11,34 +11,6 @@ When X is a name or "you".
If the given name is "Alice", the result should be "One for Alice, one for me."
If no name is given, the result should be "One for you, one for me."
-## Test-Driven Development
-
-As programmers mature, they eventually want to test their code.
-
-Here at Exercism we simulate [Test-Driven
-Development](http://en.wikipedia.org/wiki/Test-driven_development) (TDD), where
-you write your tests before writing any functionality. The simulation comes in
-the form of a pre-written test suite, which will signal that you have solved
-the problem.
-
-It will also provide you with a safety net to explore other solutions without
-breaking the functionality.
-
-### A typical TDD workflow on Exercism:
-
-1. Run the test file and pick one test that's failing.
-2. Write some code to fix the test you picked.
-3. Re-run the tests to confirm the test is now passing.
-4. Repeat from step 1.
-5. Submit your solution (`exercism submit /path/to/file`)
-
-## Instructions
-
-Submissions are encouraged to be general, within reason. Having said that, it's
-also important not to over-engineer a solution.
-
-It's important to remember that the goal is to make code as expressive and
-readable as we can.
## Setup
@@ -46,9 +18,10 @@ Go through the project setup instructions for Xcode using Swift:
http://exercism.io/languages/swift
+
## Source
-This is an exercise to introduce users to basic programming constructs, just after hello World. [https://en.wikipedia.org/wiki/Two-fer](https://en.wikipedia.org/wiki/Two-fer)
+[https://en.wikipedia.org/wiki/Two-fer](https://en.wikipedia.org/wiki/Two-fer)
## Submitting Incomplete Solutions
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
diff --git a/exercises/word-count/README.md b/exercises/word-count/README.md
index 610ff7f58..0ff512253 100644
--- a/exercises/word-count/README.md
+++ b/exercises/word-count/README.md
@@ -4,14 +4,13 @@ Given a phrase, count the occurrences of each word in that phrase.
For example for the input `"olly olly in come free"`
-```plain
+```text
olly: 2
in: 1
come: 1
free: 1
```
-
## Setup
Go through the project setup instructions for Xcode using Swift:
diff --git a/exercises/wordy/README.md b/exercises/wordy/README.md
index f72d6c1f4..0a2a58dac 100644
--- a/exercises/wordy/README.md
+++ b/exercises/wordy/README.md
@@ -2,7 +2,6 @@
Parse and evaluate simple math word problems returning the answer as an integer.
-
## Iteration 1 — Addition
Add two numbers together.
@@ -13,7 +12,6 @@ Evaluates to 18.
Handle large numbers and negative numbers.
-
## Iteration 2 — Subtraction, Multiplication and Division
Now, perform the other three operations.
@@ -30,7 +28,6 @@ Now, perform the other three operations.
5
-
## Iteration 3 — Multiple Operations
Handle a set of operations, in sequence.
@@ -46,7 +43,6 @@ left-to-right, _ignoring the typical order of operations._
15 (i.e. not 9)
-
## Bonus — Exponentials
If you'd like, handle exponentials.
@@ -55,7 +51,6 @@ If you'd like, handle exponentials.
32
-
## Setup
Go through the project setup instructions for Xcode using Swift: