trackler 2.2.1.53 → 2.2.1.54

Sign up to get free protection for your applications and to get access to all the features.
Files changed (274) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trackler/version.rb +1 -1
  3. data/problem-specifications/exercises/nth-prime/canonical-data.json +2 -7
  4. data/problem-specifications/exercises/zebra-puzzle/canonical-data.json +16 -0
  5. data/tracks/c/config.json +11 -1
  6. data/tracks/c/docs/C_STYLE_GUIDE.md +142 -0
  7. data/tracks/c/exercises/collatz-conjecture/README.md +65 -0
  8. data/tracks/c/exercises/collatz-conjecture/makefile +15 -0
  9. data/tracks/c/exercises/collatz-conjecture/src/collatz_conjecture.h +8 -0
  10. data/tracks/c/exercises/collatz-conjecture/src/example.c +23 -0
  11. data/tracks/c/exercises/collatz-conjecture/test/test_collatz_conjecture.c +48 -0
  12. data/tracks/c/exercises/collatz-conjecture/test/vendor/unity.c +1300 -0
  13. data/tracks/c/exercises/collatz-conjecture/test/vendor/unity.h +274 -0
  14. data/tracks/c/exercises/collatz-conjecture/test/vendor/unity_internals.h +701 -0
  15. data/tracks/cfml/tasks/GenerateReadme.cfc +5 -5
  16. data/tracks/erlang/testgen/src/testgen.erl +99 -17
  17. data/tracks/erlang/testgen/src/tg_file_tools.erl +3 -3
  18. data/tracks/erlang/testgen/src/tgen.erl +15 -7
  19. data/tracks/haskell/config.json +15 -3
  20. data/tracks/java/scripts/canonical_data_check.sh +1 -1
  21. data/tracks/javascript/config.json +12 -0
  22. data/tracks/javascript/exercises/difference-of-squares/README.md +1 -1
  23. data/tracks/javascript/exercises/sum-of-multiples/README.md +1 -1
  24. data/tracks/javascript/exercises/zipper/README.md +55 -0
  25. data/tracks/javascript/exercises/zipper/example.js +100 -0
  26. data/tracks/javascript/exercises/zipper/zipper.spec.js +77 -0
  27. data/tracks/julia/config.json +12 -0
  28. data/tracks/julia/exercises/triangle/README.md +30 -0
  29. data/tracks/julia/exercises/triangle/example.jl +25 -0
  30. data/tracks/julia/exercises/triangle/runtests.jl +64 -0
  31. data/tracks/julia/exercises/triangle/triangle.jl +8 -0
  32. data/tracks/kotlin/exercises/leap/.meta/version +1 -1
  33. data/tracks/kotlin/exercises/leap/src/test/kotlin/LeapTest.kt +1 -1
  34. data/tracks/kotlin/scripts/canonical_data_check.sh +1 -1
  35. data/tracks/perl6/bin/README.md +1 -4
  36. data/tracks/perl6/bin/exercise-gen.pl6 +3 -4
  37. data/tracks/perl6/exercises/accumulate/example.yaml +2 -2
  38. data/tracks/perl6/exercises/all-your-base/example.yaml +9 -9
  39. data/tracks/perl6/exercises/allergies/example.yaml +7 -7
  40. data/tracks/perl6/exercises/anagram/example.yaml +3 -3
  41. data/tracks/perl6/exercises/atbash-cipher/example.yaml +3 -3
  42. data/tracks/perl6/exercises/bob/example.yaml +4 -4
  43. data/tracks/perl6/exercises/clock/example.yaml +6 -6
  44. data/tracks/perl6/exercises/flatten-array/example.yaml +4 -4
  45. data/tracks/perl6/exercises/grade-school/example.yaml +6 -6
  46. data/tracks/perl6/exercises/grains/example.yaml +3 -3
  47. data/tracks/perl6/exercises/hello-world/example.yaml +5 -5
  48. data/tracks/perl6/exercises/leap/example.yaml +4 -4
  49. data/tracks/perl6/exercises/linked-list/example.yaml +14 -14
  50. data/tracks/perl6/exercises/luhn/example.yaml +3 -3
  51. data/tracks/perl6/exercises/phone-number/example.yaml +3 -3
  52. data/tracks/perl6/exercises/raindrops/example.yaml +3 -3
  53. data/tracks/perl6/exercises/rna-transcription/example.yaml +3 -3
  54. data/tracks/perl6/exercises/robot-name/example.yaml +8 -8
  55. data/tracks/perl6/exercises/scrabble-score/example.yaml +3 -3
  56. data/tracks/perl6/exercises/space-age/example.yaml +8 -8
  57. data/tracks/perl6/exercises/word-count/example.yaml +3 -3
  58. data/tracks/perl6/exercises/wordy/example.yaml +3 -3
  59. data/tracks/python/config.json +14 -0
  60. data/tracks/python/config/maintainers.json +30 -0
  61. data/tracks/python/docs/EXERCISE_README_INSERT.md +1 -2
  62. data/tracks/python/exercises/accumulate/README.md +1 -5
  63. data/tracks/python/exercises/acronym/README.md +1 -3
  64. data/tracks/python/exercises/all-your-base/README.md +2 -3
  65. data/tracks/python/exercises/all-your-base/all_your_base_test.py +13 -13
  66. data/tracks/python/exercises/allergies/README.md +1 -3
  67. data/tracks/python/exercises/alphametics/README.md +3 -4
  68. data/tracks/python/exercises/anagram/README.md +1 -2
  69. data/tracks/python/exercises/atbash-cipher/README.md +3 -3
  70. data/tracks/python/exercises/beer-song/README.md +2 -3
  71. data/tracks/python/exercises/binary-search/README.md +1 -2
  72. data/tracks/python/exercises/binary/README.md +3 -2
  73. data/tracks/python/exercises/bob/README.md +1 -2
  74. data/tracks/python/exercises/book-store/README.md +6 -7
  75. data/tracks/python/exercises/bracket-push/README.md +1 -2
  76. data/tracks/python/exercises/change/README.md +2 -3
  77. data/tracks/python/exercises/circular-buffer/README.md +14 -8
  78. data/tracks/python/exercises/clock/README.md +1 -2
  79. data/tracks/python/exercises/clock/clock_test.py +2 -0
  80. data/tracks/python/exercises/collatz-conjecture/.meta/hints.md +3 -0
  81. data/tracks/python/exercises/collatz-conjecture/README.md +6 -19
  82. data/tracks/python/exercises/complex-numbers/README.md +28 -2
  83. data/tracks/python/exercises/crypto-square/README.md +11 -10
  84. data/tracks/python/exercises/diamond/README.md +7 -8
  85. data/tracks/python/exercises/difference-of-squares/README.md +1 -2
  86. data/tracks/python/exercises/diffie-hellman/.meta/hints.md +1 -1
  87. data/tracks/python/exercises/diffie-hellman/README.md +3 -2
  88. data/tracks/python/exercises/error-handling/.meta/hints.md +8 -0
  89. data/tracks/python/exercises/error-handling/README.md +10 -2
  90. data/tracks/python/exercises/error-handling/error_handling_test.py +15 -3
  91. data/tracks/python/exercises/etl/README.md +3 -2
  92. data/tracks/python/exercises/flatten-array/README.md +2 -4
  93. data/tracks/python/exercises/food-chain/README.md +3 -4
  94. data/tracks/python/exercises/forth/README.md +2 -6
  95. data/tracks/python/exercises/gigasecond/README.md +1 -2
  96. data/tracks/python/exercises/grade-school/README.md +1 -3
  97. data/tracks/python/exercises/grains/README.md +1 -3
  98. data/tracks/python/exercises/grep/README.md +13 -14
  99. data/tracks/python/exercises/hamming/README.md +1 -2
  100. data/tracks/python/exercises/hamming/hamming_test.py +6 -6
  101. data/tracks/python/exercises/hello-world/README.md +1 -2
  102. data/tracks/python/exercises/hexadecimal/README.md +1 -2
  103. data/tracks/python/exercises/hexadecimal/example.py +6 -6
  104. data/tracks/python/exercises/house/README.md +2 -4
  105. data/tracks/python/exercises/isogram/README.md +3 -3
  106. data/tracks/python/exercises/kindergarten-garden/README.md +14 -15
  107. data/tracks/python/exercises/largest-series-product/README.md +1 -2
  108. data/tracks/python/exercises/leap/README.md +2 -3
  109. data/tracks/python/exercises/linked-list/README.md +11 -12
  110. data/tracks/python/exercises/list-ops/README.md +1 -2
  111. data/tracks/python/exercises/luhn/README.md +8 -9
  112. data/tracks/python/exercises/markdown/README.md +1 -6
  113. data/tracks/python/exercises/matrix/README.md +7 -6
  114. data/tracks/python/exercises/meetup/README.md +2 -4
  115. data/tracks/python/exercises/minesweeper/README.md +1 -2
  116. data/tracks/python/exercises/nth-prime/README.md +1 -2
  117. data/tracks/python/exercises/nucleotide-count/README.md +9 -24
  118. data/tracks/python/exercises/ocr-numbers/README.md +6 -7
  119. data/tracks/python/exercises/octal/README.md +7 -4
  120. data/tracks/python/exercises/palindrome-products/README.md +16 -18
  121. data/tracks/python/exercises/pangram/README.md +2 -3
  122. data/tracks/python/exercises/pascals-triangle/README.md +2 -3
  123. data/tracks/python/exercises/perfect-numbers/README.md +3 -4
  124. data/tracks/python/exercises/phone-number/README.md +4 -4
  125. data/tracks/python/exercises/pig-latin/README.md +1 -2
  126. data/tracks/python/exercises/point-mutations/README.md +1 -2
  127. data/tracks/python/exercises/poker/README.md +1 -2
  128. data/tracks/python/exercises/prime-factors/README.md +1 -2
  129. data/tracks/python/exercises/protein-translation/README.md +5 -7
  130. data/tracks/python/exercises/proverb/README.md +12 -11
  131. data/tracks/python/exercises/pythagorean-triplet/README.md +4 -5
  132. data/tracks/python/exercises/queen-attack/README.md +2 -3
  133. data/tracks/python/exercises/rail-fence-cipher/README.md +13 -9
  134. data/tracks/python/exercises/raindrops/README.md +1 -2
  135. data/tracks/python/exercises/rectangles/README.md +8 -9
  136. data/tracks/python/exercises/rectangles/example.py +3 -3
  137. data/tracks/python/exercises/rna-transcription/README.md +1 -2
  138. data/tracks/python/exercises/rna-transcription/rna_transcription_test.py +4 -3
  139. data/tracks/python/exercises/robot-name/README.md +1 -2
  140. data/tracks/python/exercises/robot-simulator/README.md +1 -2
  141. data/tracks/python/exercises/roman-numerals/README.md +2 -3
  142. data/tracks/python/exercises/rotational-cipher/README.md +3 -3
  143. data/tracks/python/exercises/run-length-encoding/README.md +5 -6
  144. data/tracks/python/exercises/run-length-encoding/example.py +2 -2
  145. data/tracks/python/exercises/saddle-points/README.md +2 -3
  146. data/tracks/python/exercises/say/README.md +1 -2
  147. data/tracks/python/exercises/scale-generator/README.md +1 -3
  148. data/tracks/python/exercises/scrabble-score/README.md +4 -3
  149. data/tracks/python/exercises/secret-handshake/README.md +2 -3
  150. data/tracks/python/exercises/series/README.md +1 -2
  151. data/tracks/python/exercises/sieve/README.md +1 -2
  152. data/tracks/python/exercises/simple-cipher/README.md +3 -4
  153. data/tracks/python/exercises/space-age/README.md +2 -3
  154. data/tracks/python/exercises/space-age/space_age_test.py +18 -29
  155. data/tracks/python/exercises/strain/README.md +1 -2
  156. data/tracks/python/exercises/sublist/README.md +1 -2
  157. data/tracks/python/exercises/sum-of-multiples/README.md +1 -5
  158. data/tracks/python/exercises/tournament/README.md +6 -7
  159. data/tracks/python/exercises/transpose/README.md +8 -9
  160. data/tracks/python/exercises/tree-building/README.md +25 -0
  161. data/tracks/python/exercises/tree-building/example.py +46 -0
  162. data/tracks/python/exercises/tree-building/tree_building.py +50 -0
  163. data/tracks/python/exercises/tree-building/tree_building_test.py +183 -0
  164. data/tracks/python/exercises/triangle/README.md +10 -8
  165. data/tracks/python/exercises/trinary/README.md +2 -3
  166. data/tracks/python/exercises/twelve-days/README.md +2 -3
  167. data/tracks/python/exercises/two-bucket/README.md +4 -5
  168. data/tracks/python/exercises/two-bucket/two_bucket_test.py +2 -0
  169. data/tracks/python/exercises/two-fer/README.md +4 -5
  170. data/tracks/python/exercises/two-fer/two_fer_test.py +5 -2
  171. data/tracks/python/exercises/variable-length-quantity/README.md +7 -9
  172. data/tracks/python/exercises/word-count/README.md +2 -4
  173. data/tracks/python/exercises/word-search/README.md +2 -3
  174. data/tracks/python/exercises/wordy/README.md +1 -7
  175. data/tracks/python/exercises/wordy/example.py +8 -8
  176. data/tracks/python/exercises/wordy/wordy_test.py +36 -32
  177. data/tracks/python/exercises/zebra-puzzle/README.md +1 -2
  178. data/tracks/python/requirements-travis.txt +1 -1
  179. data/tracks/ruby/config.json +11 -0
  180. data/tracks/ruby/docs/TESTS.md +6 -0
  181. data/tracks/ruby/exercises/pangram/.meta/.version +1 -1
  182. data/tracks/ruby/exercises/pangram/.meta/solutions/pangram.rb +1 -1
  183. data/tracks/ruby/exercises/pangram/pangram_test.rb +11 -4
  184. data/tracks/ruby/exercises/two-fer/.meta/.version +1 -0
  185. data/tracks/ruby/exercises/two-fer/.meta/generator/two_fer_case.rb +12 -0
  186. data/tracks/ruby/exercises/two-fer/.meta/solutions/two_fer.rb +9 -0
  187. data/tracks/ruby/exercises/two-fer/README.md +69 -0
  188. data/tracks/ruby/exercises/two-fer/two_fer_test.rb +42 -0
  189. data/tracks/rust/config.json +12 -0
  190. data/tracks/rust/exercises/binary-search/.meta/hints.md +38 -0
  191. data/tracks/rust/exercises/binary-search/Cargo.lock +4 -0
  192. data/tracks/rust/exercises/binary-search/Cargo.toml +6 -0
  193. data/tracks/rust/exercises/binary-search/README.md +113 -0
  194. data/tracks/rust/exercises/binary-search/example.rs +29 -0
  195. data/tracks/rust/exercises/binary-search/src/lib.rs +0 -0
  196. data/tracks/rust/exercises/binary-search/tests/binary-search.rs +96 -0
  197. data/tracks/typescript/common/package.json +6 -6
  198. data/tracks/typescript/common/yarn.lock +929 -610
  199. data/tracks/typescript/exercises/acronym/package.json +6 -6
  200. data/tracks/typescript/exercises/acronym/yarn.lock +929 -610
  201. data/tracks/typescript/exercises/anagram/package.json +6 -6
  202. data/tracks/typescript/exercises/anagram/yarn.lock +929 -610
  203. data/tracks/typescript/exercises/beer-song/package.json +6 -6
  204. data/tracks/typescript/exercises/beer-song/yarn.lock +929 -610
  205. data/tracks/typescript/exercises/binary-search-tree/package.json +6 -6
  206. data/tracks/typescript/exercises/binary-search-tree/yarn.lock +929 -610
  207. data/tracks/typescript/exercises/binary-search/package.json +6 -6
  208. data/tracks/typescript/exercises/binary-search/yarn.lock +929 -610
  209. data/tracks/typescript/exercises/bob/package.json +6 -6
  210. data/tracks/typescript/exercises/bob/yarn.lock +929 -610
  211. data/tracks/typescript/exercises/circular-buffer/package.json +6 -6
  212. data/tracks/typescript/exercises/circular-buffer/yarn.lock +929 -610
  213. data/tracks/typescript/exercises/clock/package.json +6 -6
  214. data/tracks/typescript/exercises/clock/yarn.lock +929 -610
  215. data/tracks/typescript/exercises/difference-of-squares/package.json +6 -6
  216. data/tracks/typescript/exercises/difference-of-squares/yarn.lock +929 -610
  217. data/tracks/typescript/exercises/etl/package.json +6 -6
  218. data/tracks/typescript/exercises/etl/yarn.lock +929 -610
  219. data/tracks/typescript/exercises/food-chain/package.json +6 -6
  220. data/tracks/typescript/exercises/food-chain/yarn.lock +929 -610
  221. data/tracks/typescript/exercises/gigasecond/package.json +6 -6
  222. data/tracks/typescript/exercises/gigasecond/yarn.lock +929 -610
  223. data/tracks/typescript/exercises/grade-school/package.json +6 -6
  224. data/tracks/typescript/exercises/grade-school/yarn.lock +929 -610
  225. data/tracks/typescript/exercises/hamming/package.json +6 -6
  226. data/tracks/typescript/exercises/hamming/yarn.lock +929 -610
  227. data/tracks/typescript/exercises/hello-world/README.md +354 -0
  228. data/tracks/typescript/exercises/hello-world/package.json +6 -6
  229. data/tracks/typescript/exercises/hello-world/yarn.lock +929 -610
  230. data/tracks/typescript/exercises/largest-series-product/package.json +6 -6
  231. data/tracks/typescript/exercises/largest-series-product/yarn.lock +929 -610
  232. data/tracks/typescript/exercises/leap/package.json +6 -6
  233. data/tracks/typescript/exercises/leap/yarn.lock +929 -610
  234. data/tracks/typescript/exercises/linked-list/package.json +6 -6
  235. data/tracks/typescript/exercises/linked-list/yarn.lock +929 -610
  236. data/tracks/typescript/exercises/nth-prime/package.json +6 -6
  237. data/tracks/typescript/exercises/nth-prime/yarn.lock +929 -610
  238. data/tracks/typescript/exercises/pangram/package.json +6 -6
  239. data/tracks/typescript/exercises/pangram/yarn.lock +929 -610
  240. data/tracks/typescript/exercises/pascals-triangle/package.json +6 -6
  241. data/tracks/typescript/exercises/pascals-triangle/yarn.lock +929 -610
  242. data/tracks/typescript/exercises/phone-number/package.json +6 -6
  243. data/tracks/typescript/exercises/phone-number/yarn.lock +929 -610
  244. data/tracks/typescript/exercises/prime-factors/package.json +6 -6
  245. data/tracks/typescript/exercises/prime-factors/yarn.lock +929 -610
  246. data/tracks/typescript/exercises/raindrops/package.json +6 -6
  247. data/tracks/typescript/exercises/raindrops/yarn.lock +929 -610
  248. data/tracks/typescript/exercises/rna-transcription/package.json +6 -6
  249. data/tracks/typescript/exercises/rna-transcription/yarn.lock +929 -610
  250. data/tracks/typescript/exercises/robot-name/package.json +6 -6
  251. data/tracks/typescript/exercises/robot-name/yarn.lock +929 -610
  252. data/tracks/typescript/exercises/robot-simulator/package.json +6 -6
  253. data/tracks/typescript/exercises/robot-simulator/yarn.lock +929 -610
  254. data/tracks/typescript/exercises/rotational-cipher/package.json +6 -6
  255. data/tracks/typescript/exercises/rotational-cipher/yarn.lock +929 -610
  256. data/tracks/typescript/exercises/say/package.json +6 -6
  257. data/tracks/typescript/exercises/say/yarn.lock +929 -610
  258. data/tracks/typescript/exercises/scrabble-score/package.json +6 -6
  259. data/tracks/typescript/exercises/scrabble-score/yarn.lock +929 -610
  260. data/tracks/typescript/exercises/series/package.json +6 -6
  261. data/tracks/typescript/exercises/series/yarn.lock +929 -610
  262. data/tracks/typescript/exercises/space-age/package.json +6 -6
  263. data/tracks/typescript/exercises/space-age/yarn.lock +929 -610
  264. data/tracks/typescript/exercises/strain/package.json +6 -6
  265. data/tracks/typescript/exercises/strain/yarn.lock +929 -610
  266. data/tracks/typescript/exercises/sum-of-multiples/package.json +6 -6
  267. data/tracks/typescript/exercises/sum-of-multiples/yarn.lock +929 -610
  268. data/tracks/typescript/exercises/triangle/package.json +6 -6
  269. data/tracks/typescript/exercises/triangle/yarn.lock +929 -610
  270. data/tracks/typescript/exercises/word-count/package.json +6 -6
  271. data/tracks/typescript/exercises/word-count/yarn.lock +929 -610
  272. data/tracks/typescript/exercises/wordy/package.json +6 -6
  273. data/tracks/typescript/exercises/wordy/yarn.lock +929 -610
  274. metadata +37 -2
@@ -13,13 +13,12 @@ in the input; the digits need not be *numerically consecutive*.
13
13
  For the input `'73167176531330624919225119674426574742355349194934'`,
14
14
  the largest product for a series of 6 digits is 23520.
15
15
 
16
- ### Submitting Exercises
16
+ ## Submitting Exercises
17
17
 
18
18
  Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.
19
19
 
20
20
  For example, if you're submitting `bob.py` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/python/bob/bob.py`.
21
21
 
22
-
23
22
  For more detailed information about running tests, code style and linting,
24
23
  please see the [help page](http://exercism.io/languages/python).
25
24
 
@@ -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
@@ -26,13 +26,12 @@ phenomenon, go watch [this youtube video][video].
26
26
 
27
27
  [video]: http://www.youtube.com/watch?v=xX96xng7sAE
28
28
 
29
- ### Submitting Exercises
29
+ ## Submitting Exercises
30
30
 
31
31
  Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.
32
32
 
33
33
  For example, if you're submitting `bob.py` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/python/bob/bob.py`.
34
34
 
35
-
36
35
  For more detailed information about running tests, code style and linting,
37
36
  please see the [help page](http://exercism.io/languages/python).
38
37
 
@@ -2,18 +2,18 @@
2
2
 
3
3
  Implement a doubly linked list.
4
4
 
5
- Like an array, a linked list is a simple linear data structure. Several
6
- common data types can be implemented using linked lists, like queues,
5
+ Like an array, a linked list is a simple linear data structure. Several
6
+ common data types can be implemented using linked lists, like queues,
7
7
  stacks, and associative arrays.
8
8
 
9
- A linked list is a collection of data elements called *nodes*. In a
10
- *singly linked list* each node holds a value and a link to the next node.
11
- In a *doubly linked list* each node also holds a link to the previous
9
+ A linked list is a collection of data elements called *nodes*. In a
10
+ *singly linked list* each node holds a value and a link to the next node.
11
+ In a *doubly linked list* each node also holds a link to the previous
12
12
  node.
13
13
 
14
- You will write an implementation of a doubly linked list. Implement a
15
- Node to hold a value and pointers to the next and previous nodes. Then
16
- implement a List which holds references to the first and last node and
14
+ You will write an implementation of a doubly linked list. Implement a
15
+ Node to hold a value and pointers to the next and previous nodes. Then
16
+ implement a List which holds references to the first and last node and
17
17
  offers an array-like interface for adding and removing items:
18
18
 
19
19
  * `push` (*insert value at back*);
@@ -21,19 +21,18 @@ offers an array-like interface for adding and removing items:
21
21
  * `shift` (*remove value at front*).
22
22
  * `unshift` (*insert value at front*);
23
23
 
24
- To keep your implementation simple, the tests will not cover error
25
- conditions. Specifically: `pop` or `shift` will never be called on an
24
+ To keep your implementation simple, the tests will not cover error
25
+ conditions. Specifically: `pop` or `shift` will never be called on an
26
26
  empty list.
27
27
 
28
28
  If you want to know more about linked lists, check [Wikipedia](https://en.wikipedia.org/wiki/Linked_list).
29
29
 
30
- ### Submitting Exercises
30
+ ## Submitting Exercises
31
31
 
32
32
  Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.
33
33
 
34
34
  For example, if you're submitting `bob.py` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/python/bob/bob.py`.
35
35
 
36
-
37
36
  For more detailed information about running tests, code style and linting,
38
37
  please see the [help page](http://exercism.io/languages/python).
39
38
 
@@ -6,13 +6,12 @@ In functional languages list operations like `length`, `map`, and
6
6
  `reduce` are very common. Implement a series of basic list operations,
7
7
  without using existing functions.
8
8
 
9
- ### Submitting Exercises
9
+ ## Submitting Exercises
10
10
 
11
11
  Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.
12
12
 
13
13
  For example, if you're submitting `bob.py` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/python/bob/bob.py`.
14
14
 
15
-
16
15
  For more detailed information about running tests, code style and linting,
17
16
  please see the [help page](http://exercism.io/languages/python).
18
17
 
@@ -18,27 +18,27 @@ are disallowed.
18
18
 
19
19
  ## Example 1: valid credit card number
20
20
 
21
- ```
21
+ ```text
22
22
  4539 1488 0343 6467
23
23
  ```
24
24
 
25
25
  The first step of the Luhn algorithm is to double every second digit,
26
26
  starting from the right. We will be doubling
27
27
 
28
- ```
28
+ ```text
29
29
  4_3_ 1_8_ 0_4_ 6_6_
30
30
  ```
31
31
 
32
32
  If doubling the number results in a number greater than 9 then subtract 9
33
33
  from the product. The results of our doubling:
34
34
 
35
- ```
35
+ ```text
36
36
  8569 2478 0383 3437
37
37
  ```
38
38
 
39
39
  Then sum all of the digits:
40
40
 
41
- ```
41
+ ```text
42
42
  8+5+6+9+2+4+7+8+0+3+8+3+3+4+3+7 = 80
43
43
  ```
44
44
 
@@ -46,31 +46,30 @@ If the sum is evenly divisible by 10, then the number is valid. This number is v
46
46
 
47
47
  ## Example 2: invalid credit card number
48
48
 
49
- ```
49
+ ```text
50
50
  8273 1232 7352 0569
51
51
  ```
52
52
 
53
53
  Double the second digits, starting from the right
54
54
 
55
- ```
55
+ ```text
56
56
  7253 2262 5312 0539
57
57
  ```
58
58
 
59
59
  Sum the digits
60
60
 
61
- ```
61
+ ```text
62
62
  7+2+5+3+2+2+6+2+5+3+1+2+0+5+3+9 = 57
63
63
  ```
64
64
 
65
65
  57 is not evenly divisible by 10, so this number is not valid.
66
66
 
67
- ### Submitting Exercises
67
+ ## Submitting Exercises
68
68
 
69
69
  Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.
70
70
 
71
71
  For example, if you're submitting `bob.py` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/python/bob/bob.py`.
72
72
 
73
-
74
73
  For more detailed information about running tests, code style and linting,
75
74
  please see the [help page](http://exercism.io/languages/python).
76
75
 
@@ -12,19 +12,14 @@ It would be helpful if you made notes of what you did in your refactoring in
12
12
  comments so reviewers can see that, but it isn't strictly necessary. The most
13
13
  important thing is to make the code better!
14
14
 
15
- ### Submitting Exercises
15
+ ## Submitting Exercises
16
16
 
17
17
  Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.
18
18
 
19
19
  For example, if you're submitting `bob.py` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/python/bob/bob.py`.
20
20
 
21
-
22
21
  For more detailed information about running tests, code style and linting,
23
22
  please see the [help page](http://exercism.io/languages/python).
24
23
 
25
- ## Source
26
-
27
- Syntax [https://guides.github.com/features/mastering-markdown/](https://guides.github.com/features/mastering-markdown/)
28
-
29
24
  ## Submitting Incomplete Solutions
30
25
  It's possible to submit an incomplete solution so you can see how others have completed the exercise.
@@ -5,13 +5,15 @@ that matrix.
5
5
 
6
6
  So given a string with embedded newlines like:
7
7
 
8
- > 9 8 7
9
- > 5 3 2
10
- > 6 6 7
8
+ ```text
9
+ 9 8 7
10
+ 5 3 2
11
+ 6 6 7
12
+ ```
11
13
 
12
14
  representing this matrix:
13
15
 
14
- ```plain
16
+ ```text
15
17
  0 1 2
16
18
  |---------
17
19
  0 | 9 8 7
@@ -38,13 +40,12 @@ And its columns:
38
40
  - 8, 3, 6
39
41
  - 7, 2, 7
40
42
 
41
- ### Submitting Exercises
43
+ ## Submitting Exercises
42
44
 
43
45
  Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.
44
46
 
45
47
  For example, if you're submitting `bob.py` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/python/bob/bob.py`.
46
48
 
47
-
48
49
  For more detailed information about running tests, code style and linting,
49
50
  please see the [help page](http://exercism.io/languages/python).
50
51
 
@@ -18,18 +18,16 @@ end in '-teenth'. Therefore, one is guaranteed that each day of the week
18
18
  (Monday, Tuesday, ...) will have exactly one date that is named with '-teenth'
19
19
  in every month.
20
20
 
21
- Given examples of a meetup dates, each containing a month, day, year, and descriptor
21
+ Given examples of a meetup dates, each containing a month, day, year, and descriptor
22
22
  (first, second, teenth, etc), calculate the date of the actual meetup.
23
23
  For example, if given "First Monday of January 2017", the correct meetup date is 2017/1/2
24
-
25
24
 
26
- ### Submitting Exercises
25
+ ## Submitting Exercises
27
26
 
28
27
  Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.
29
28
 
30
29
  For example, if you're submitting `bob.py` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/python/bob/bob.py`.
31
30
 
32
-
33
31
  For more detailed information about running tests, code style and linting,
34
32
  please see the [help page](http://exercism.io/languages/python).
35
33
 
@@ -26,13 +26,12 @@ into this:
26
26
  | 111 |
27
27
  +-----+
28
28
 
29
- ### Submitting Exercises
29
+ ## Submitting Exercises
30
30
 
31
31
  Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.
32
32
 
33
33
  For example, if you're submitting `bob.py` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/python/bob/bob.py`.
34
34
 
35
-
36
35
  For more detailed information about running tests, code style and linting,
37
36
  please see the [help page](http://exercism.io/languages/python).
38
37
 
@@ -8,13 +8,12 @@ the 6th prime is 13.
8
8
  If your language provides methods in the standard library to deal with prime
9
9
  numbers, pretend they don't exist and implement them yourself.
10
10
 
11
- ### Submitting Exercises
11
+ ## Submitting Exercises
12
12
 
13
13
  Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.
14
14
 
15
15
  For example, if you're submitting `bob.py` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/python/bob/bob.py`.
16
16
 
17
-
18
17
  For more detailed information about running tests, code style and linting,
19
18
  please see the [help page](http://exercism.io/languages/python).
20
19
 
@@ -1,38 +1,23 @@
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.
11
+ - nucleotides are to DNA as
12
+ - legos are to lego houses as
13
+ - words are to sentences as...
22
14
 
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.
28
-
29
- ### Submitting Exercises
15
+ ## Submitting Exercises
30
16
 
31
17
  Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.
32
18
 
33
19
  For example, if you're submitting `bob.py` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/python/bob/bob.py`.
34
20
 
35
-
36
21
  For more detailed information about running tests, code style and linting,
37
22
  please see the [help page](http://exercism.io/languages/python).
38
23
 
@@ -9,7 +9,7 @@ To begin with, convert a simple binary font to a string containing 0 or 1.
9
9
 
10
10
  The binary font uses pipes and underscores, four rows high and three columns wide.
11
11
 
12
- ```
12
+ ```text
13
13
  _ #
14
14
  | | # zero.
15
15
  |_| #
@@ -18,7 +18,7 @@ The binary font uses pipes and underscores, four rows high and three columns wid
18
18
 
19
19
  Is converted to "0"
20
20
 
21
- ```
21
+ ```text
22
22
  #
23
23
  | # one.
24
24
  | #
@@ -39,7 +39,7 @@ Update your program to recognize multi-character binary strings, replacing garbl
39
39
 
40
40
  Update your program to recognize all numbers 0 through 9, both individually and as part of a larger string.
41
41
 
42
- ```
42
+ ```text
43
43
  _
44
44
  _|
45
45
  |_
@@ -48,7 +48,7 @@ Update your program to recognize all numbers 0 through 9, both individually and
48
48
 
49
49
  Is converted to "2"
50
50
 
51
- ```
51
+ ```text
52
52
  _ _ _ _ _ _ _ _ #
53
53
  | _| _||_||_ |_ ||_||_|| | # decimal numbers.
54
54
  ||_ _| | _||_| ||_| _||_| #
@@ -61,7 +61,7 @@ Is converted to "1234567890"
61
61
 
62
62
  Update your program to handle multiple numbers, one per line. When converting several lines, join the lines with commas.
63
63
 
64
- ```
64
+ ```text
65
65
  _ _
66
66
  | _| _|
67
67
  ||_ _|
@@ -78,13 +78,12 @@ Update your program to handle multiple numbers, one per line. When converting se
78
78
 
79
79
  Is converted to "123,456,789"
80
80
 
81
- ### Submitting Exercises
81
+ ## Submitting Exercises
82
82
 
83
83
  Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.
84
84
 
85
85
  For example, if you're submitting `bob.py` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/python/bob/bob.py`.
86
86
 
87
-
88
87
  For more detailed information about running tests, code style and linting,
89
88
  please see the [help page](http://exercism.io/languages/python).
90
89
 
@@ -8,11 +8,13 @@ Implement octal to decimal conversion. Given an octal input
8
8
  string, your program should produce a decimal output.
9
9
 
10
10
  ## Note
11
+
11
12
  - Implement the conversion yourself.
12
13
  Do not use something else to perform the conversion for you.
13
14
  - Treat invalid input as octal 0.
14
15
 
15
16
  ## About Octal (Base-8)
17
+
16
18
  Decimal is a base-10 system.
17
19
 
18
20
  A number 233 in base 10 notation can be understood
@@ -25,7 +27,8 @@ as a linear combination of powers of 10:
25
27
  - All these values are summed.
26
28
 
27
29
  So:
28
- ```
30
+
31
+ ```text
29
32
  233 # decimal
30
33
  = 2*10^2 + 3*10^1 + 3*10^0
31
34
  = 2*100 + 3*10 + 3*1
@@ -34,7 +37,8 @@ So:
34
37
  Octal is similar, but uses powers of 8 rather than powers of 10.
35
38
 
36
39
  So:
37
- ```
40
+
41
+ ```text
38
42
  233 # octal
39
43
  = 2*8^2 + 3*8^1 + 3*8^0
40
44
  = 2*64 + 3*8 + 3*1
@@ -42,13 +46,12 @@ So:
42
46
  = 155
43
47
  ```
44
48
 
45
- ### Submitting Exercises
49
+ ## Submitting Exercises
46
50
 
47
51
  Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.
48
52
 
49
53
  For example, if you're submitting `bob.py` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/python/bob/bob.py`.
50
54
 
51
-
52
55
  For more detailed information about running tests, code style and linting,
53
56
  please see the [help page](http://exercism.io/languages/python).
54
57
 
@@ -5,41 +5,39 @@ Detect palindrome products in a given range.
5
5
  A palindromic number is a number that remains the same when its digits are
6
6
  reversed. For example, `121` is a palindromic number but `112` is not.
7
7
 
8
- Given the definition of a palindromic number, we define a palindrome _product_
9
- to be the product `c`, such that `a * b = c`, where `c` is a palindromic number and
10
- `a` and `b` are integers (possibly, but _not_ necessarily palindromic numbers).
8
+ Given a range of numbers, find the largest and smallest palindromes which
9
+ are products of numbers within that range.
11
10
 
12
- For example, the palindromic number 9009 can be written as the palindrome
13
- product: `91 * 99 = 9009`.
14
-
15
- It's possible (and indeed common) for a palindrome product to be the product
16
- of multiple combinations of numbers. For example, the palindrome product `9` has
17
- the factors `(1, 9)`, `(3, 3)`, and `(9, 1)`.
18
-
19
- Write a program that given a range of integers, returns the smallest and largest
20
- palindromic product within that range, along with all of it's factors.
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
13
+ than one pair of factors within the range, then return all the pairs.
21
14
 
22
15
  ## Example 1
23
16
 
24
17
  Given the range `[1, 9]` (both inclusive)...
25
18
 
26
- The smallest product is `1`. It's factors are `(1, 1)`.
27
- The largest product is `9`. It's factors are `(1, 9)`, `(3, 3)`, and `(9, 1)`.
19
+ And given the list of all possible products within this range:
20
+ `[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]`
21
+
22
+ The palindrome products are all single digit numbers (in this case):
23
+ `[1, 2, 3, 4, 5, 6, 7, 8, 9]`
24
+
25
+ The smallest palindrome product is `1`. Its factors are `(1, 1)`.
26
+ The largest palindrome product is `9`. Its factors are `(1, 9)` and `(3, 3)`.
28
27
 
29
28
  ## Example 2
30
29
 
31
30
  Given the range `[10, 99]` (both inclusive)...
32
31
 
33
- The smallest palindrome product is `121`. It's factors are `(11, 11)`.
34
- The largest palindrome product is `9009`. It's factors are `(91, 99)` and `(99, 91)`.
32
+ The smallest palindrome product is `121`. Its factors are `(11, 11)`.
33
+ The largest palindrome product is `9009`. Its factors are `(91, 99)`.
35
34
 
36
- ### Submitting Exercises
35
+ ## Submitting Exercises
37
36
 
38
37
  Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.
39
38
 
40
39
  For example, if you're submitting `bob.py` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/python/bob/bob.py`.
41
40
 
42
-
43
41
  For more detailed information about running tests, code style and linting,
44
42
  please see the [help page](http://exercism.io/languages/python).
45
43