Bladeren bron

Regenerate READMEs

Skipped Bob since the README change is for a newer version than the
current Java test suite.
Stuart Kent 8 jaren geleden
bovenliggende
commit
eacc900aa4

+ 1
- 1
exercises/beer-song/README.md Bestand weergeven

@@ -1,6 +1,6 @@
1 1
 # Beer Song
2 2
 
3
-Produce the lyrics to that beloved classic, that field-trip favorite: 99 Bottles of Beer on the Wall.
3
+Recite the lyrics to that beloved classic, that field-trip favorite: 99 Bottles of Beer on the Wall.
4 4
 
5 5
 Note that not all verses are identical.
6 6
 

+ 1
- 1
exercises/house/README.md Bestand weergeven

@@ -1,6 +1,6 @@
1 1
 # House
2 2
 
3
-Output the nursery rhyme 'This is the House that Jack Built'.
3
+Recite the nursery rhyme 'This is the House that Jack Built'.
4 4
 
5 5
 > [The] process of placing a phrase of clause within another phrase of
6 6
 > clause is called embedding. It is through the processes of recursion

+ 27
- 21
exercises/isbn-verifier/README.md Bestand weergeven

@@ -1,39 +1,45 @@
1
-Check if a given ISBN-10 is valid.
1
+# Isbn Verifier
2 2
 
3
-## Functionality
3
+The [ISBN-10 verification process](https://en.wikipedia.org/wiki/International_Standard_Book_Number) is used to validate book identification
4
+numbers. These normally contain dashes and look like: `3-598-21508-8`
4 5
 
5
-Given an unknown string the program should check if the provided string is a valid ISBN-10.
6
-Putting this into place requires some thinking about preprocessing/parsing of the string prior to calculating the check digit for the ISBN.
6
+## ISBN
7 7
 
8
-The program should allow for ISBN-10 without the separating dashes to be verified as well.
8
+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:
9 9
 
10
-## ISBN
10
+```
11
+(x1 * 10 + x2 * 9 + x3 * 8 + x4 * 7 + x5 * 6 + x6 * 5 + x7 * 4 + x8 * 3 + x9 * 2 + x10 * 1) mod 11 == 0
12
+```
11 13
 
12
-Let's take a random ISBN-10 number, say `3-598-21508-8` for this.
13
-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.
14
-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.
15
-The last digit in the ISBN is the check digit which is used to detect read errors.
14
+If the result is 0, then it is a valid ISBN-10, otherwise it is invalid.
16 15
 
17
-The first 9 digits in the ISBN have to be between 0 and 9.
18
-The check digit can additionally be an 'X' to allow 10 to be a valid check digit as well.
16
+## Example
19 17
 
20
-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`
21
-So for our example ISBN this means:
22
-(3 * 10 + 5 * 9 + 9 * 8 + 8 * 7 + 2 * 6 + 1 * 5 + 5 * 4 + 0 * 3 + 8 * 2 + 8 * 1) mod 11 = 0
18
+Let's take the ISBN-10 `3-598-21508-8`. We plug it in to the formula, and get:
19
+```
20
+(3 * 10 + 5 * 9 + 9 * 8 + 8 * 7 + 2 * 6 + 1 * 5 + 5 * 4 + 0 * 3 + 8 * 2 + 8 * 1) mod 11 == 0
21
+```
22
+
23
+Since the result is 0, this proves that our ISBN is valid.
24
+
25
+## Task
26
+
27
+Given a string the program should check if the provided string is a valid ISBN-10.
28
+Putting this into place requires some thinking about preprocessing/parsing of the string prior to calculating the check digit for the ISBN.
29
+
30
+The program should be able to verify ISBN-10 both with and without separating dashes.
23 31
 
24
-Which proves that the ISBN is valid.
25 32
 
26 33
 ## Caveats
27 34
 
28
-Converting from string to number can be tricky in certain languages.
29
-It's getting even trickier since the check-digit of an ISBN-10 can be 'X'.
35
+Converting from strings to numbers can be tricky in certain languages.
36
+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.
30 37
 
31 38
 ## Bonus tasks
32 39
 
33
-* Generate a valid ISBN-13 from the input ISBN-10 (and maybe verify it again with a derived verifier)
34
-
35
-* Generate valid ISBN, maybe even from a given starting ISBN
40
+* Generate a valid ISBN-13 from the input ISBN-10 (and maybe verify it again with a derived verifier).
36 41
 
42
+* Generate valid ISBN, maybe even from a given starting ISBN.
37 43
 # Running the tests
38 44
 
39 45
 You can run all the tests for an exercise by entering

+ 3
- 3
exercises/kindergarten-garden/README.md Bestand weergeven

@@ -9,8 +9,8 @@ actual dirt, and grow actual plants.
9 9
 
10 10
 They've chosen to grow grass, clover, radishes, and violets.
11 11
 
12
-To this end, the children have put little cups along the window sills, and 
13
-planted one type of plant in each cup, choosing randomly from the available 
12
+To this end, the children have put little cups along the window sills, and
13
+planted one type of plant in each cup, choosing randomly from the available
14 14
 types of seeds.
15 15
 
16 16
 ```text
@@ -25,7 +25,7 @@ There are 12 children in the class:
25 25
 - Eve, Fred, Ginny, Harriet,
26 26
 - Ileana, Joseph, Kincaid, and Larry.
27 27
 
28
-Each child gets 4 cups, two on each row. Their teacher assigns cups to 
28
+Each child gets 4 cups, two on each row. Their teacher assigns cups to
29 29
 the children alphabetically by their names.
30 30
 
31 31
 The following diagram represents Alice's plants:

+ 16
- 12
exercises/meetup/README.md Bestand weergeven

@@ -2,25 +2,29 @@
2 2
 
3 3
 Calculate the date of meetups.
4 4
 
5
-Typically meetups happen on the same day of the week.  In this exercise, you will take
6
-a description of a meetup date, and return the actual meetup date.
5
+Typically meetups happen on the same day of the week.  In this exercise, you
6
+will take a description of a meetup date, and return the actual meetup date.
7 7
 
8 8
 Examples of general descriptions are:
9 9
 
10
-- the first Monday of January 2017
11
-- the third Tuesday of January 2017
12
-- the Wednesteenth of January 2017
13
-- the last Thursday of January 2017
10
+- The first Monday of January 2017
11
+- The third Tuesday of January 2017
12
+- The wednesteenth of January 2017
13
+- The last Thursday of January 2017
14 14
 
15
-Note that "Monteenth", "Tuesteenth", etc are all made up words. There
16
-was a meetup whose members realized that there are exactly 7 numbered days in a month that
17
-end in '-teenth'. Therefore, one is guaranteed that each day of the week
15
+The descriptors you are expected to parse are:
16
+first, second, third, fourth, fifth, last, monteenth, tuesteenth, wednesteenth,
17
+thursteenth, friteenth, saturteenth, sunteenth
18
+
19
+Note that "monteenth", "tuesteenth", etc are all made up words. There was a
20
+meetup whose members realized that there are exactly 7 numbered days in a month
21
+that end in '-teenth'. Therefore, one is guaranteed that each day of the week
18 22
 (Monday, Tuesday, ...) will have exactly one date that is named with '-teenth'
19 23
 in every month.
20 24
 
21
-Given examples of a meetup dates, each containing a month, day, year, and descriptor
22
-(first, second, teenth, etc), calculate the date of the actual meetup.
23
-For example, if given "First Monday of January 2017", the correct meetup date is 2017/1/2
25
+Given examples of a meetup dates, each containing a month, day, year, and
26
+descriptor calculate the date of the actual meetup.  For example, if given
27
+"The first Monday of January 2017", the correct meetup date is 2017/1/2.
24 28
 
25 29
 # Running the tests
26 30
 

+ 2
- 2
exercises/nucleotide-count/README.md Bestand weergeven

@@ -2,8 +2,8 @@
2 2
 
3 3
 Given a single stranded DNA string, compute how many times each nucleotide occurs in the string.
4 4
 
5
-The genetic language of every living thing on the planet is DNA. 
6
-DNA is a large molecule that is built from an extremely long sequence of individual elements called nucleotides. 
5
+The genetic language of every living thing on the planet is DNA.
6
+DNA is a large molecule that is built from an extremely long sequence of individual elements called nucleotides.
7 7
 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.
8 8
 
9 9
 Here is an analogy:

+ 1
- 1
exercises/palindrome-products/README.md Bestand weergeven

@@ -9,7 +9,7 @@ Given a range of numbers, find the largest and smallest palindromes which
9 9
 are products of numbers within that range.
10 10
 
11 11
 Your solution should return the largest and smallest palindromes, along with the
12
-factors of each within the range. If the largest or smallest palindrome has more 
12
+factors of each within the range. If the largest or smallest palindrome has more
13 13
 than one pair of factors within the range, then return all the pairs.
14 14
 
15 15
 ## Example 1

+ 2
- 0
exercises/parallel-letter-frequency/README.md Bestand weergeven

@@ -13,6 +13,7 @@ Single-threaded (non-concurrent) solutions can pass all tests [but the last.](ht
13 13
 
14 14
 Java documentation on [parallel streams](https://docs.oracle.com/javase/tutorial/collections/streams/parallelism.html) may provide some help.
15 15
 
16
+
16 17
 # Running the tests
17 18
 
18 19
 You can run all the tests for an exercise by entering
@@ -23,6 +24,7 @@ $ gradle test
23 24
 
24 25
 in your terminal.
25 26
 
27
+
26 28
 ## Submitting Incomplete Solutions
27 29
 
28 30
 It's possible to submit an incomplete solution so you can see how others have completed the exercise.

+ 1
- 0
exercises/pig-latin/README.md Bestand weergeven

@@ -78,6 +78,7 @@ The new error should tell you which type it's expecting.
78 78
 
79 79
 After having resolved these errors you should be ready to start making the tests pass!
80 80
 
81
+
81 82
 # Running the tests
82 83
 
83 84
 You can run all the tests for an exercise by entering

+ 4
- 2
exercises/protein-translation/README.md Bestand weergeven

@@ -1,4 +1,6 @@
1
-#Translate RNA sequences into proteins.
1
+# Protein Translation
2
+
3
+Translate RNA sequences into proteins.
2 4
 
3 5
 RNA can be broken into three nucleotide sequences called codons, and then translated to a polypeptide like so:
4 6
 
@@ -55,4 +57,4 @@ Tyler Long
55 57
 
56 58
 ## Submitting Incomplete Solutions
57 59
 
58
-It's possible to submit an incomplete solution so you can see how others have completed the exercise.
60
+It's possible to submit an incomplete solution so you can see how others have completed the exercise.

+ 9
- 9
exercises/rectangles/README.md Bestand weergeven

@@ -37,27 +37,27 @@ The above diagram contains 6 rectangles:
37 37
 ```
38 38
 
39 39
 ```text
40
-       
41
-       
40
+
41
+
42 42
    +--+
43 43
    |  |
44 44
    +--+
45 45
 ```
46 46
 
47 47
 ```text
48
-       
49
-       
48
+
49
+
50 50
 +--+
51 51
 |  |
52 52
 +--+
53 53
 ```
54 54
 
55 55
 ```text
56
-       
57
-  ++   
58
-  ++   
59
-       
60
-       
56
+
57
+  ++
58
+  ++
59
+
60
+
61 61
 ```
62 62
 
63 63
 You may assume that the input is always a proper rectangle (i.e. the length of

+ 4
- 6
exercises/simple-cipher/README.md Bestand weergeven

@@ -58,15 +58,13 @@ would get the same thing as the Caesar Cipher.
58 58
 
59 59
 The weakest link in any cipher is the human being. Let's make your
60 60
 substitution cipher a little more fault tolerant by providing a source
61
-of randomness and ensuring that the key is not composed of numbers or
62
-capital letters.
61
+of randomness and ensuring that the key contains only lowercase letters.
63 62
 
64 63
 If someone doesn't submit a key at all, generate a truly random key of
65
-at least 100 characters in length, accessible via Cipher#key (the #
66
-syntax means instance variable)
64
+at least 100 characters in length.
67 65
 
68
-If the key submitted has capital letters or numbers, throw an
69
-ArgumentError with a message to that effect.
66
+If the key submitted is not composed only of lowercase letters, your
67
+solution should handle the error in a language-appropriate way.
70 68
 
71 69
 ## Extensions
72 70
 

+ 3
- 3
exercises/sum-of-multiples/README.md Bestand weergeven

@@ -1,10 +1,10 @@
1 1
 # Sum Of Multiples
2 2
 
3
-Given a number, find the sum of all the multiples of particular numbers up to
3
+Given a number, find the sum of all the unique multiples of particular numbers up to
4 4
 but not including that number.
5 5
 
6
-If we list all the natural numbers up to but not including 20 that are
7
-multiples of either 3 or 5, we get 3, 5, 6 and 9, 10, 12, 15, and 18.
6
+If we list all the natural numbers below 20 that are multiples of 3 or 5,
7
+we get 3, 5, 6, 9, 10, 12, 15, and 18.
8 8
 
9 9
 The sum of these multiples is 78.
10 10