trackler 2.2.1.100 → 2.2.1.101

Sign up to get free protection for your applications and to get access to all the features.
Files changed (204) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trackler/version.rb +1 -1
  3. data/problem-specifications/exercises/kindergarten-garden/canonical-data.json +37 -19
  4. data/problem-specifications/exercises/ocr-numbers/canonical-data.json +144 -110
  5. data/problem-specifications/exercises/palindrome-products/canonical-data.json +49 -25
  6. data/problem-specifications/exercises/poker/canonical-data.json +171 -115
  7. data/problem-specifications/exercises/prime-factors/canonical-data.json +22 -8
  8. data/problem-specifications/exercises/protein-translation/canonical-data.json +70 -24
  9. data/problem-specifications/exercises/proverb/canonical-data.json +24 -12
  10. data/problem-specifications/exercises/queen-attack/canonical-data.json +115 -91
  11. data/problem-specifications/exercises/rail-fence-cipher/canonical-data.json +25 -13
  12. data/problem-specifications/exercises/raindrops/canonical-data.json +55 -19
  13. data/problem-specifications/exercises/rational-numbers/canonical-data.json +374 -0
  14. data/problem-specifications/exercises/rational-numbers/description.md +27 -0
  15. data/problem-specifications/exercises/rational-numbers/metadata.yml +4 -0
  16. data/problem-specifications/exercises/rectangles/canonical-data.json +93 -67
  17. data/problem-specifications/exercises/reverse-string/canonical-data.json +16 -6
  18. data/problem-specifications/exercises/rna-transcription/metadata.yml +3 -3
  19. data/problem-specifications/exercises/roman-numerals/canonical-data.json +10 -2
  20. data/tracks/bash/config.json +11 -11
  21. data/tracks/c/exercises/roman-numerals/test/test_roman_numerals.c +7 -0
  22. data/tracks/clojure/exercises/armstrong-numbers/README.md +1 -1
  23. data/tracks/delphi/config.json +11 -0
  24. data/tracks/delphi/exercises/clock/uClockExample.pas +6 -1
  25. data/tracks/delphi/exercises/clock/uClockTest.pas +22 -19
  26. data/tracks/delphi/exercises/isbn-verifier/README.md +1 -1
  27. data/tracks/delphi/exercises/reverse-string/README.md +1 -1
  28. data/tracks/delphi/exercises/rna-transcription/README.md +1 -1
  29. data/tracks/delphi/exercises/roman-numerals/uRomanNumeralsTest.pas +14 -0
  30. data/tracks/delphi/exercises/space-age/README.md +45 -0
  31. data/tracks/delphi/exercises/space-age/SpaceAge.dpr +60 -0
  32. data/tracks/delphi/exercises/space-age/uSpaceAgeExample.pas +120 -0
  33. data/tracks/delphi/exercises/space-age/uSpaceAgeTests.pas +135 -0
  34. data/tracks/delphi/exercises/two-fer/README.md +1 -1
  35. data/tracks/elixir/exercises/nth-prime/nth_prime.exs +0 -1
  36. data/tracks/fsharp/exercises/pov/PovTest.fs +66 -53
  37. data/tracks/fsharp/exercises/space-age/Example.fs +11 -11
  38. data/tracks/fsharp/exercises/space-age/SpaceAge.fs +1 -1
  39. data/tracks/fsharp/exercises/space-age/SpaceAgeTest.fs +21 -34
  40. data/tracks/fsharp/exercises/triangle/Example.fs +11 -16
  41. data/tracks/fsharp/exercises/triangle/Triangle.fs +4 -5
  42. data/tracks/fsharp/exercises/triangle/TriangleTest.fs +44 -31
  43. data/tracks/fsharp/generators/Generators.fs +121 -0
  44. data/tracks/go/config.json +12 -0
  45. data/tracks/go/exercises/clock/.meta/gen.go +37 -13
  46. data/tracks/go/exercises/clock/cases_test.go +10 -10
  47. data/tracks/go/exercises/clock/clock_test.go +16 -2
  48. data/tracks/go/exercises/clock/example.go +4 -0
  49. data/tracks/go/exercises/clock/example_clock_test.go +3 -3
  50. data/tracks/go/exercises/parallel-letter-frequency/.meta/hints.md +33 -0
  51. data/tracks/go/exercises/parallel-letter-frequency/README.md +35 -0
  52. data/tracks/go/exercises/raindrops/.meta/hints.md +7 -4
  53. data/tracks/go/exercises/raindrops/README.md +12 -0
  54. data/tracks/go/exercises/roman-numerals/.meta/gen.go +4 -2
  55. data/tracks/go/exercises/roman-numerals/cases_test.go +3 -2
  56. data/tracks/go/exercises/space-age/.meta/hints.md +10 -0
  57. data/tracks/go/exercises/space-age/README.md +14 -1
  58. data/tracks/go/exercises/twelve-days/README.md +2 -5
  59. data/tracks/go/exercises/two-bucket/.meta/gen.go +62 -0
  60. data/tracks/go/exercises/two-bucket/.meta/hints.md +16 -0
  61. data/tracks/go/exercises/two-bucket/README.md +72 -0
  62. data/tracks/go/exercises/two-bucket/cases_test.go +44 -0
  63. data/tracks/go/exercises/two-bucket/example.go +198 -0
  64. data/tracks/go/exercises/two-bucket/two_bucket_test.go +61 -0
  65. data/tracks/idris/.travis.yml +3 -2
  66. data/tracks/idris/bin/fetch-idris-testing.sh +11 -0
  67. data/tracks/idris/bin/solve_exercises.sh +2 -2
  68. data/tracks/idris/config.json +11 -0
  69. data/tracks/idris/config/exercise_readme.go.tmpl +0 -3
  70. data/tracks/idris/docs/INSTALLATION.md +22 -0
  71. data/tracks/idris/docs/TESTS.md +12 -4
  72. data/tracks/idris/exercises/accumulate/src/Accumulate.idr +5 -0
  73. data/tracks/idris/exercises/hamming/Hamming.ipkg +2 -0
  74. data/tracks/idris/exercises/hamming/src/{example.idr → Example.idr} +5 -1
  75. data/tracks/idris/exercises/hamming/src/Hamming.idr +13 -5
  76. data/tracks/idris/exercises/hamming/src/Test/Hamming.idr +31 -58
  77. data/tracks/idris/exercises/hello-world/HelloWorld.ipkg +2 -0
  78. data/tracks/idris/exercises/hello-world/src/Example.idr +9 -0
  79. data/tracks/idris/exercises/hello-world/src/HelloWorld.idr +6 -1
  80. data/tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr +18 -18
  81. data/tracks/idris/exercises/leap/Leap.ipkg +2 -0
  82. data/tracks/idris/exercises/leap/src/{example.idr → Example.idr} +4 -0
  83. data/tracks/idris/exercises/leap/src/Leap.idr +5 -1
  84. data/tracks/idris/exercises/leap/src/Test/Leap.idr +21 -30
  85. data/tracks/idris/exercises/rna-transcription/Makefile +23 -0
  86. data/tracks/idris/exercises/rna-transcription/README.md +27 -0
  87. data/tracks/idris/exercises/rna-transcription/RnaTranscription.ipkg +5 -0
  88. data/tracks/idris/exercises/rna-transcription/src/RnaTranscription.idr +17 -0
  89. data/tracks/idris/exercises/rna-transcription/src/Test/RnaTranscription.idr +27 -0
  90. data/tracks/idris/exercises/rna-transcription/src/example.idr +35 -0
  91. data/tracks/java/exercises/etl/.meta/version +1 -0
  92. data/tracks/java/exercises/gigasecond/.meta/version +1 -0
  93. data/tracks/java/exercises/isbn-verifier/README.md +1 -1
  94. data/tracks/java/exercises/nucleotide-count/.meta/src/reference/java/NucleotideCounter.java +7 -1
  95. data/tracks/java/exercises/nucleotide-count/.meta/version +1 -0
  96. data/tracks/java/exercises/nucleotide-count/src/test/java/NucleotideCounterTest.java +19 -54
  97. data/tracks/java/exercises/proverb/.meta/version +1 -0
  98. data/tracks/java/exercises/reverse-string/README.md +1 -1
  99. data/tracks/java/exercises/rna-transcription/README.md +1 -1
  100. data/tracks/java/exercises/sum-of-multiples/.meta/version +1 -0
  101. data/tracks/java/exercises/sum-of-multiples/src/test/java/SumOfMultiplesTest.java +13 -1
  102. data/tracks/kotlin/config/exercise_readme.go.tmpl +0 -3
  103. data/tracks/kotlin/docs/TESTS.md +1 -1
  104. data/tracks/objective-c/config.json +11 -0
  105. data/tracks/objective-c/exercises/collatz-conjecture/CollatzConjectureExample.h +7 -0
  106. data/tracks/objective-c/exercises/collatz-conjecture/CollatzConjectureExample.m +26 -0
  107. data/tracks/objective-c/exercises/collatz-conjecture/CollatzConjectureTest.m +39 -0
  108. data/tracks/objective-c/xcodeProject/ObjectiveC.xcodeproj/project.pbxproj +31 -1
  109. data/tracks/objective-c/xcodeProject/ObjectiveC.xcodeproj/xcshareddata/xcschemes/OCLint.xcscheme +3 -1
  110. data/tracks/objective-c/xcodeProject/ObjectiveC.xcodeproj/xcshareddata/xcschemes/xobjectivecTest.xcscheme +3 -1
  111. data/tracks/ocaml/exercises/forth/example.ml +9 -9
  112. data/tracks/ocaml/tools/test-generator/Makefile +3 -9
  113. data/tracks/ocaml/tools/test-generator/src/test_gen.ml +18 -16
  114. data/tracks/perl6/exercises/acronym/.meta/exercise-data.yaml +1 -1
  115. data/tracks/perl6/exercises/acronym/acronym.t +4 -14
  116. data/tracks/perl6/exercises/all-your-base/all-your-base.t +0 -2
  117. data/tracks/perl6/exercises/allergies/allergies.t +0 -2
  118. data/tracks/perl6/exercises/anagram/.meta/exercise-data.yaml +1 -1
  119. data/tracks/perl6/exercises/anagram/anagram.t +2 -40
  120. data/tracks/perl6/exercises/atbash-cipher/atbash-cipher.t +0 -1
  121. data/tracks/perl6/exercises/bob/bob.t +0 -2
  122. data/tracks/perl6/exercises/clock/.meta/exercise-data.yaml +15 -11
  123. data/tracks/perl6/exercises/clock/.meta/solutions/Clock.pm6 +5 -1
  124. data/tracks/perl6/exercises/clock/Clock.pm6 +1 -1
  125. data/tracks/perl6/exercises/clock/clock.t +314 -217
  126. data/tracks/perl6/exercises/etl/etl.t +0 -2
  127. data/tracks/perl6/exercises/flatten-array/flatten-array.t +0 -2
  128. data/tracks/perl6/exercises/grains/grains.t +0 -2
  129. data/tracks/perl6/exercises/hamming/.meta/exercise-data.yaml +2 -2
  130. data/tracks/perl6/exercises/hamming/hamming.t +63 -35
  131. data/tracks/perl6/exercises/hello-world/hello-world.t +2 -3
  132. data/tracks/perl6/exercises/leap/.meta/exercise-data.yaml +1 -1
  133. data/tracks/perl6/exercises/leap/leap.t +14 -8
  134. data/tracks/perl6/exercises/luhn/luhn.t +0 -2
  135. data/tracks/perl6/exercises/nucleotide-count/.meta/exercise-data.yaml +2 -2
  136. data/tracks/perl6/exercises/nucleotide-count/nucleotide-count.t +18 -10
  137. data/tracks/perl6/exercises/pangram/.meta/exercise-data.yaml +1 -1
  138. data/tracks/perl6/exercises/pangram/pangram.t +32 -14
  139. data/tracks/perl6/exercises/phone-number/.meta/exercise-data.yaml +4 -4
  140. data/tracks/perl6/exercises/phone-number/.meta/solutions/Phone.pm6 +1 -1
  141. data/tracks/perl6/exercises/phone-number/Phone.pm6 +1 -1
  142. data/tracks/perl6/exercises/phone-number/phone-number.t +59 -21
  143. data/tracks/perl6/exercises/raindrops/raindrops.t +0 -2
  144. data/tracks/perl6/exercises/rna-transcription/.meta/exercise-data.yaml +1 -1
  145. data/tracks/perl6/exercises/rna-transcription/README.md +1 -1
  146. data/tracks/perl6/exercises/rna-transcription/rna-transcription.t +17 -9
  147. data/tracks/perl6/exercises/roman-numerals/.meta/exercise-data.yaml +3 -3
  148. data/tracks/perl6/exercises/roman-numerals/.meta/solutions/RomanNumerals.pm6 +1 -1
  149. data/tracks/perl6/exercises/roman-numerals/RomanNumerals.pm6 +1 -1
  150. data/tracks/perl6/exercises/roman-numerals/roman-numerals.t +66 -24
  151. data/tracks/perl6/exercises/scrabble-score/.meta/exercise-data.yaml +1 -1
  152. data/tracks/perl6/exercises/scrabble-score/scrabble-score.t +35 -15
  153. data/tracks/perl6/exercises/space-age/.meta/exercise-data.yaml +1 -1
  154. data/tracks/perl6/exercises/space-age/space-age.t +34 -20
  155. data/tracks/perl6/exercises/two-fer/.meta/exercise-data.yaml +2 -2
  156. data/tracks/perl6/exercises/two-fer/two-fer.t +15 -11
  157. data/tracks/perl6/exercises/word-count/.meta/exercise-data.yaml +1 -1
  158. data/tracks/perl6/exercises/word-count/word-count.t +46 -26
  159. data/tracks/perl6/exercises/wordy/.meta/exercise-data.yaml +2 -2
  160. data/tracks/perl6/exercises/wordy/wordy.t +51 -21
  161. data/tracks/perl6/lib/Exercism/Generator.pm6 +1 -1
  162. data/tracks/perl6/t/generated-tests.t +1 -1
  163. data/tracks/perl6/templates/test.mustache +0 -1
  164. data/tracks/python/config.json +12 -0
  165. data/tracks/python/exercises/forth/example.py +1 -1
  166. data/tracks/python/exercises/forth/forth_test.py +43 -38
  167. data/tracks/python/exercises/spiral-matrix/README.md +42 -0
  168. data/tracks/python/exercises/spiral-matrix/example.py +11 -0
  169. data/tracks/python/exercises/spiral-matrix/spiral_matrix.py +2 -0
  170. data/tracks/python/exercises/spiral-matrix/spiral_matrix_test.py +40 -0
  171. data/tracks/racket/config/exercise_readme.go.tmpl +24 -4
  172. data/tracks/racket/exercises/accumulate/README.md +3 -6
  173. data/tracks/racket/exercises/acronym/README.md +3 -4
  174. data/tracks/racket/exercises/allergies/README.md +3 -4
  175. data/tracks/racket/exercises/anagram/README.md +3 -3
  176. data/tracks/racket/exercises/bob/README.md +5 -3
  177. data/tracks/racket/exercises/collatz-conjecture/README.md +3 -3
  178. data/tracks/racket/exercises/difference-of-squares/README.md +3 -3
  179. data/tracks/racket/exercises/etl/README.md +6 -4
  180. data/tracks/racket/exercises/gigasecond/README.md +3 -3
  181. data/tracks/racket/exercises/grains/README.md +3 -4
  182. data/tracks/racket/exercises/grep/README.md +15 -15
  183. data/tracks/racket/exercises/hamming/README.md +3 -3
  184. data/tracks/racket/exercises/hello-world/README.md +1 -1
  185. data/tracks/racket/exercises/leap/README.md +4 -4
  186. data/tracks/racket/exercises/list-ops/README.md +3 -4
  187. data/tracks/racket/exercises/meetup/README.md +19 -15
  188. data/tracks/racket/exercises/nucleotide-count/README.md +11 -25
  189. data/tracks/racket/exercises/perfect-numbers/README.md +5 -5
  190. data/tracks/racket/exercises/phone-number/README.md +7 -6
  191. data/tracks/racket/exercises/raindrops/README.md +3 -3
  192. data/tracks/racket/exercises/rna-transcription/README.md +4 -4
  193. data/tracks/racket/exercises/roman-numerals/README.md +4 -4
  194. data/tracks/racket/exercises/say/README.md +3 -3
  195. data/tracks/racket/exercises/scrabble-score/README.md +6 -4
  196. data/tracks/racket/exercises/word-count/README.md +4 -5
  197. data/tracks/scheme/config/exercise_readme.go.tmpl +0 -3
  198. data/tracks/scheme/docs/INSTALLATION.md +23 -14
  199. metadata +40 -9
  200. data/tracks/idris/docs/EXERCISE_README_INSERT.md +0 -0
  201. data/tracks/idris/exercises/hello-world/src/example.idr +0 -5
  202. data/tracks/kotlin/config/exercise-readme-insert.md +0 -1
  203. data/tracks/racket/docs/EXERCISE_README_INSERT.md +0 -23
  204. data/tracks/scheme/docs/EXERCISE_README_INSERT.md +0 -0
@@ -21,16 +21,16 @@ You can run the provided tests through DrRacket, or via the command line.
21
21
 
22
22
  To run the test through DrRacket, simply open the test file and click the 'Run' button in the upper right.
23
23
 
24
- To run the test from the command line, simply run the test from the exercise directory. For example, if the test suite is called `hello-world-test.rkt`, you can run the following command:
24
+ To run the test from the command line, run the test from the exercise directory with the following command:
25
25
 
26
26
  ```
27
- raco test hello-world-test.rkt
27
+ raco test difference-of-squares-test.rkt
28
28
  ```
29
29
 
30
30
  which will display the following:
31
31
 
32
32
  ```
33
- raco test: (submod "hello-world-test.rkt" test)
33
+ raco test: (submod "difference-of-squares-test.rkt" test)
34
34
  2 success(es) 0 failure(s) 0 error(s) 2 test(s) run
35
35
  0
36
36
  2 tests passed
@@ -1,8 +1,9 @@
1
- # Etl
1
+ # ETL
2
2
 
3
3
  We are going to do the `Transform` step of an Extract-Transform-Load.
4
4
 
5
5
  ### ETL
6
+
6
7
  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
7
8
  we're going to migrate this."
8
9
 
@@ -11,6 +12,7 @@ once." That's then typically followed by much forehead slapping and
11
12
  moaning about how stupid we could possibly be.)
12
13
 
13
14
  ### The goal
15
+
14
16
  We're going to extract some scrabble scores from a legacy system.
15
17
 
16
18
  The old system stored a list of letters per score:
@@ -53,16 +55,16 @@ You can run the provided tests through DrRacket, or via the command line.
53
55
 
54
56
  To run the test through DrRacket, simply open the test file and click the 'Run' button in the upper right.
55
57
 
56
- To run the test from the command line, simply run the test from the exercise directory. For example, if the test suite is called `hello-world-test.rkt`, you can run the following command:
58
+ To run the test from the command line, run the test from the exercise directory with the following command:
57
59
 
58
60
  ```
59
- raco test hello-world-test.rkt
61
+ raco test etl-test.rkt
60
62
  ```
61
63
 
62
64
  which will display the following:
63
65
 
64
66
  ```
65
- raco test: (submod "hello-world-test.rkt" test)
67
+ raco test: (submod "etl-test.rkt" test)
66
68
  2 success(es) 0 failure(s) 0 error(s) 2 test(s) run
67
69
  0
68
70
  2 tests passed
@@ -13,16 +13,16 @@ You can run the provided tests through DrRacket, or via the command line.
13
13
 
14
14
  To run the test through DrRacket, simply open the test file and click the 'Run' button in the upper right.
15
15
 
16
- To run the test from the command line, simply run the test from the exercise directory. For example, if the test suite is called `hello-world-test.rkt`, you can run the following command:
16
+ To run the test from the command line, run the test from the exercise directory with the following command:
17
17
 
18
18
  ```
19
- raco test hello-world-test.rkt
19
+ raco test gigasecond-test.rkt
20
20
  ```
21
21
 
22
22
  which will display the following:
23
23
 
24
24
  ```
25
- raco test: (submod "hello-world-test.rkt" test)
25
+ raco test: (submod "gigasecond-test.rkt" test)
26
26
  2 success(es) 0 failure(s) 0 error(s) 2 test(s) run
27
27
  0
28
28
  2 tests passed
@@ -15,7 +15,6 @@ Write code that shows:
15
15
  - how many grains were on each square, and
16
16
  - the total number of grains
17
17
 
18
-
19
18
  ## For bonus points
20
19
 
21
20
  Did you get the tests passing and the code clean? If you want to, these
@@ -36,16 +35,16 @@ You can run the provided tests through DrRacket, or via the command line.
36
35
 
37
36
  To run the test through DrRacket, simply open the test file and click the 'Run' button in the upper right.
38
37
 
39
- To run the test from the command line, simply run the test from the exercise directory. For example, if the test suite is called `hello-world-test.rkt`, you can run the following command:
38
+ To run the test from the command line, run the test from the exercise directory with the following command:
40
39
 
41
40
  ```
42
- raco test hello-world-test.rkt
41
+ raco test grains-test.rkt
43
42
  ```
44
43
 
45
44
  which will display the following:
46
45
 
47
46
  ```
48
- raco test: (submod "hello-world-test.rkt" test)
47
+ raco test: (submod "grains-test.rkt" test)
49
48
  2 success(es) 0 failure(s) 0 error(s) 2 test(s) run
50
49
  0
51
50
  2 tests passed
@@ -3,14 +3,14 @@
3
3
  Search a file for lines matching a regular expression pattern. Return the line
4
4
  number and contents of each matching line.
5
5
 
6
- The Unix [`grep`](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html) command can be used to search for lines in one or more files
6
+ The Unix [`grep`](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html) command can be used to search for lines in one or more files
7
7
  that match a user-provided search query (known as the *pattern*).
8
8
 
9
9
  The `grep` command takes three arguments:
10
10
 
11
- 1. The pattern used to match lines in a file.
11
+ 1. The pattern used to match lines in a file.
12
12
  2. Zero or more flags to customize the matching behavior.
13
- 3. One or more files in which to search for matching lines.
13
+ 3. One or more files in which to search for matching lines.
14
14
 
15
15
  Your task is to implement the `grep` function, which should read the contents
16
16
  of the specified files, find the lines that match the specified pattern
@@ -20,18 +20,18 @@ in the first file being output first.
20
20
 
21
21
  As an example, suppose there is a file named "input.txt" with the following contents:
22
22
 
23
- <pre>
23
+ ```text
24
24
  hello
25
25
  world
26
26
  hello again
27
- </pre>
27
+ ```
28
28
 
29
29
  If we were to call `grep "hello" input.txt`, the returned string should be:
30
30
 
31
- <pre>
31
+ ```text
32
32
  hello
33
33
  hello again
34
- </pre>
34
+ ```
35
35
 
36
36
  ### Flags
37
37
 
@@ -46,18 +46,18 @@ As said earlier, the `grep` command should also support the following flags:
46
46
  If we run `grep -n "hello" input.txt`, the `-n` flag will require the matching
47
47
  lines to be prefixed with its line number:
48
48
 
49
- <pre>
49
+ ```text
50
50
  1:hello
51
51
  3:hello again
52
- </pre>
52
+ ```
53
53
 
54
- And if we run `grep -i "HELLO" input.txt`, we'll do a case-insensitive match,
54
+ And if we run `grep -i "HELLO" input.txt`, we'll do a case-insensitive match,
55
55
  and the output will be:
56
56
 
57
- <pre>
57
+ ```text
58
58
  hello
59
59
  hello again
60
- </pre>
60
+ ```
61
61
 
62
62
  The `grep` command should support multiple flags at once.
63
63
 
@@ -73,16 +73,16 @@ You can run the provided tests through DrRacket, or via the command line.
73
73
 
74
74
  To run the test through DrRacket, simply open the test file and click the 'Run' button in the upper right.
75
75
 
76
- To run the test from the command line, simply run the test from the exercise directory. For example, if the test suite is called `hello-world-test.rkt`, you can run the following command:
76
+ To run the test from the command line, run the test from the exercise directory with the following command:
77
77
 
78
78
  ```
79
- raco test hello-world-test.rkt
79
+ raco test grep-test.rkt
80
80
  ```
81
81
 
82
82
  which will display the following:
83
83
 
84
84
  ```
85
- raco test: (submod "hello-world-test.rkt" test)
85
+ raco test: (submod "grep-test.rkt" test)
86
86
  2 success(es) 0 failure(s) 0 error(s) 2 test(s) run
87
87
  0
88
88
  2 tests passed
@@ -44,16 +44,16 @@ You can run the provided tests through DrRacket, or via the command line.
44
44
 
45
45
  To run the test through DrRacket, simply open the test file and click the 'Run' button in the upper right.
46
46
 
47
- To run the test from the command line, simply run the test from the exercise directory. For example, if the test suite is called `hello-world-test.rkt`, you can run the following command:
47
+ To run the test from the command line, run the test from the exercise directory with the following command:
48
48
 
49
49
  ```
50
- raco test hello-world-test.rkt
50
+ raco test hamming-test.rkt
51
51
  ```
52
52
 
53
53
  which will display the following:
54
54
 
55
55
  ```
56
- raco test: (submod "hello-world-test.rkt" test)
56
+ raco test: (submod "hamming-test.rkt" test)
57
57
  2 success(es) 0 failure(s) 0 error(s) 2 test(s) run
58
58
  0
59
59
  2 tests passed
@@ -23,7 +23,7 @@ You can run the provided tests through DrRacket, or via the command line.
23
23
 
24
24
  To run the test through DrRacket, simply open the test file and click the 'Run' button in the upper right.
25
25
 
26
- To run the test from the command line, simply run the test from the exercise directory. For example, if the test suite is called `hello-world-test.rkt`, you can run the following command:
26
+ To run the test from the command line, run the test from the exercise directory with the following command:
27
27
 
28
28
  ```
29
29
  raco test hello-world-test.rkt
@@ -4,7 +4,7 @@ Given a year, report if it is a leap year.
4
4
 
5
5
  The tricky thing here is that a leap year in the Gregorian calendar occurs:
6
6
 
7
- ```plain
7
+ ```text
8
8
  on every year that is evenly divisible by 4
9
9
  except every year that is evenly divisible by 100
10
10
  unless the year is also evenly divisible by 400
@@ -35,16 +35,16 @@ You can run the provided tests through DrRacket, or via the command line.
35
35
 
36
36
  To run the test through DrRacket, simply open the test file and click the 'Run' button in the upper right.
37
37
 
38
- To run the test from the command line, simply run the test from the exercise directory. For example, if the test suite is called `hello-world-test.rkt`, you can run the following command:
38
+ To run the test from the command line, run the test from the exercise directory with the following command:
39
39
 
40
40
  ```
41
- raco test hello-world-test.rkt
41
+ raco test leap-test.rkt
42
42
  ```
43
43
 
44
44
  which will display the following:
45
45
 
46
46
  ```
47
- raco test: (submod "hello-world-test.rkt" test)
47
+ raco test: (submod "leap-test.rkt" test)
48
48
  2 success(es) 0 failure(s) 0 error(s) 2 test(s) run
49
49
  0
50
50
  2 tests passed
@@ -15,21 +15,20 @@ You can run the provided tests through DrRacket, or via the command line.
15
15
 
16
16
  To run the test through DrRacket, simply open the test file and click the 'Run' button in the upper right.
17
17
 
18
- To run the test from the command line, simply run the test from the exercise directory. For example, if the test suite is called `hello-world-test.rkt`, you can run the following command:
18
+ To run the test from the command line, run the test from the exercise directory with the following command:
19
19
 
20
20
  ```
21
- raco test hello-world-test.rkt
21
+ raco test list-ops-test.rkt
22
22
  ```
23
23
 
24
24
  which will display the following:
25
25
 
26
26
  ```
27
- raco test: (submod "hello-world-test.rkt" test)
27
+ raco test: (submod "list-ops-test.rkt" test)
28
28
  2 success(es) 0 failure(s) 0 error(s) 2 test(s) run
29
29
  0
30
30
  2 tests passed
31
31
  ```
32
32
 
33
-
34
33
  ## Submitting Incomplete Solutions
35
34
  It's possible to submit an incomplete solution so you can see how others have completed the exercise.
@@ -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
  * * * *
26
30
 
@@ -31,16 +35,16 @@ You can run the provided tests through DrRacket, or via the command line.
31
35
 
32
36
  To run the test through DrRacket, simply open the test file and click the 'Run' button in the upper right.
33
37
 
34
- To run the test from the command line, simply run the test from the exercise directory. For example, if the test suite is called `hello-world-test.rkt`, you can run the following command:
38
+ To run the test from the command line, run the test from the exercise directory with the following command:
35
39
 
36
40
  ```
37
- raco test hello-world-test.rkt
41
+ raco test meetup-test.rkt
38
42
  ```
39
43
 
40
44
  which will display the following:
41
45
 
42
46
  ```
43
- raco test: (submod "hello-world-test.rkt" test)
47
+ raco test: (submod "meetup-test.rkt" test)
44
48
  2 success(es) 0 failure(s) 0 error(s) 2 test(s) run
45
49
  0
46
50
  2 tests passed
@@ -1,30 +1,16 @@
1
1
  # Nucleotide Count
2
2
 
3
- Given a DNA string, compute how many times each nucleotide occurs in the string.
3
+ Given a single stranded DNA string, compute how many times each nucleotide occurs in the string.
4
4
 
5
- DNA is represented by an alphabet of the following symbols: 'A', 'C',
6
- 'G', and 'T'.
7
-
8
- Each symbol represents a nucleotide, which is a fancy name for the
9
- particular molecules that happen to make up a large part of DNA.
10
-
11
- Shortest intro to biochemistry EVAR:
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
+ 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.
12
8
 
9
+ Here is an analogy:
13
10
  - twigs are to birds nests as
14
- - nucleotides are to DNA and RNA as
15
- - amino acids are to proteins as
16
- - sugar is to starch as
17
- - oh crap lipids
18
-
19
- I'm not going to talk about lipids because they're crazy complex.
20
-
21
- So back to nucleotides.
22
-
23
- DNA contains four types of them: adenine (`A`), cytosine (`C`), guanine
24
- (`G`), and thymine (`T`).
25
-
26
- RNA contains a slightly different set of nucleotides, but we don't care
27
- about that for now.
11
+ - nucleotides are to DNA as
12
+ - legos are to lego houses as
13
+ - words are to sentences as...
28
14
 
29
15
  * * * *
30
16
 
@@ -35,16 +21,16 @@ You can run the provided tests through DrRacket, or via the command line.
35
21
 
36
22
  To run the test through DrRacket, simply open the test file and click the 'Run' button in the upper right.
37
23
 
38
- To run the test from the command line, simply run the test from the exercise directory. For example, if the test suite is called `hello-world-test.rkt`, you can run the following command:
24
+ To run the test from the command line, run the test from the exercise directory with the following command:
39
25
 
40
26
  ```
41
- raco test hello-world-test.rkt
27
+ raco test nucleotide-count-test.rkt
42
28
  ```
43
29
 
44
30
  which will display the following:
45
31
 
46
32
  ```
47
- raco test: (submod "hello-world-test.rkt" test)
33
+ raco test: (submod "nucleotide-count-test.rkt" test)
48
34
  2 success(es) 0 failure(s) 0 error(s) 2 test(s) run
49
35
  0
50
36
  2 tests passed
@@ -5,7 +5,7 @@ Nicomachus' (60 - 120 CE) classification scheme for natural numbers.
5
5
 
6
6
  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
7
7
 
8
- - **Perfect**: aliquot sum = number
8
+ - **Perfect**: aliquot sum = number
9
9
  - 6 is a perfect number because (1 + 2 + 3) = 6
10
10
  - 28 is a perfect number because (1 + 2 + 4 + 7 + 14) = 28
11
11
  - **Abundant**: aliquot sum > number
@@ -14,7 +14,7 @@ The Greek mathematician [Nicomachus](https://en.wikipedia.org/wiki/Nicomachus) d
14
14
  - **Deficient**: aliquot sum < number
15
15
  - 8 is a deficient number because (1 + 2 + 4) = 7
16
16
  - Prime numbers are deficient
17
-
17
+
18
18
  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**.
19
19
 
20
20
  * * * *
@@ -26,16 +26,16 @@ You can run the provided tests through DrRacket, or via the command line.
26
26
 
27
27
  To run the test through DrRacket, simply open the test file and click the 'Run' button in the upper right.
28
28
 
29
- To run the test from the command line, simply run the test from the exercise directory. For example, if the test suite is called `hello-world-test.rkt`, you can run the following command:
29
+ To run the test from the command line, run the test from the exercise directory with the following command:
30
30
 
31
31
  ```
32
- raco test hello-world-test.rkt
32
+ raco test perfect-numbers-test.rkt
33
33
  ```
34
34
 
35
35
  which will display the following:
36
36
 
37
37
  ```
38
- raco test: (submod "hello-world-test.rkt" test)
38
+ raco test: (submod "perfect-numbers-test.rkt" test)
39
39
  2 success(es) 0 failure(s) 0 error(s) 2 test(s) run
40
40
  0
41
41
  2 tests passed
@@ -6,14 +6,15 @@ The **North American Numbering Plan (NANP)** is a telephone numbering system use
6
6
 
7
7
  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*.
8
8
 
9
-
10
9
  The format is usually represented as
11
- ```
10
+
11
+ ```text
12
12
  (NXX)-NXX-XXXX
13
13
  ```
14
+
14
15
  where `N` is any digit from 2 through 9 and `X` is any digit from 0 through 9.
15
16
 
16
- Your task is to clean up differently formated telephone numbers by removing punctuation and the country code (1) if present.
17
+ Your task is to clean up differently formatted telephone numbers by removing punctuation and the country code (1) if present.
17
18
 
18
19
  For example, the inputs
19
20
  - `+1 (613)-995-0253`
@@ -36,16 +37,16 @@ You can run the provided tests through DrRacket, or via the command line.
36
37
 
37
38
  To run the test through DrRacket, simply open the test file and click the 'Run' button in the upper right.
38
39
 
39
- To run the test from the command line, simply run the test from the exercise directory. For example, if the test suite is called `hello-world-test.rkt`, you can run the following command:
40
+ To run the test from the command line, run the test from the exercise directory with the following command:
40
41
 
41
42
  ```
42
- raco test hello-world-test.rkt
43
+ raco test phone-number-test.rkt
43
44
  ```
44
45
 
45
46
  which will display the following:
46
47
 
47
48
  ```
48
- raco test: (submod "hello-world-test.rkt" test)
49
+ raco test: (submod "phone-number-test.rkt" test)
49
50
  2 success(es) 0 failure(s) 0 error(s) 2 test(s) run
50
51
  0
51
52
  2 tests passed