trackler 2.2.1.102 → 2.2.1.103
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/trackler/version.rb +1 -1
- data/problem-specifications/exercises/two-fer/metadata.yml +0 -1
- data/tracks/c/exercises/bob/.meta/description.md +10 -0
- data/tracks/cfml/exercises/acronym/.meta/{HINTS.md → hints.md} +0 -0
- data/tracks/cfml/exercises/anagram/.meta/{HINTS.md → hints.md} +0 -0
- data/tracks/cfml/exercises/atbash-cipher/.meta/{HINTS.md → hints.md} +0 -0
- data/tracks/cfml/exercises/bob/.meta/description.md +10 -0
- data/tracks/cfml/exercises/bob/.meta/{HINTS.md → hints.md} +0 -0
- data/tracks/cfml/exercises/diamond/.meta/{HINTS.md → hints.md} +0 -0
- data/tracks/cfml/exercises/difference-of-squares/.meta/{HINTS.md → hints.md} +0 -0
- data/tracks/cfml/exercises/flatten-array/.meta/{HINTS.md → hints.md} +0 -0
- data/tracks/cfml/exercises/gigasecond/.meta/{HINTS.md → hints.md} +0 -0
- data/tracks/cfml/exercises/grains/.meta/{HINTS.md → hints.md} +0 -0
- data/tracks/cfml/exercises/hamming/.meta/{HINTS.md → hints.md} +0 -0
- data/tracks/cfml/exercises/isogram/.meta/{HINTS.md → hints.md} +0 -0
- data/tracks/cfml/exercises/largest-series-product/.meta/{HINTS.md → hints.md} +0 -0
- data/tracks/cfml/exercises/luhn/.meta/{HINTS.md → hints.md} +0 -0
- data/tracks/cfml/exercises/markdown/.meta/{HINTS.md → hints.md} +0 -0
- data/tracks/cfml/exercises/nth-prime/.meta/{HINTS.md → hints.md} +0 -0
- data/tracks/cfml/exercises/pangram/.meta/{HINTS.md → hints.md} +0 -0
- data/tracks/cfml/exercises/pig-latin/.meta/{HINTS.md → hints.md} +0 -0
- data/tracks/cfml/exercises/raindrops/.meta/{HINTS.md → hints.md} +0 -0
- data/tracks/cfml/exercises/rna-transcription/.meta/{HINTS.md → hints.md} +0 -0
- data/tracks/cfml/exercises/saddle-points/.meta/{HINTS.md → hints.md} +0 -0
- data/tracks/cfml/exercises/scrabble-score/.meta/{HINTS.md → hints.md} +0 -0
- data/tracks/cfml/exercises/secret-handshake/.meta/{HINTS.md → hints.md} +0 -0
- data/tracks/cfml/exercises/space-age/.meta/{HINTS.md → hints.md} +0 -0
- data/tracks/cfml/exercises/sum-of-multiples/.meta/{HINTS.md → hints.md} +0 -0
- data/tracks/cfml/exercises/triangle/.meta/{HINTS.md → hints.md} +0 -0
- data/tracks/cfml/exercises/word-count/.meta/{HINTS.md → hints.md} +0 -0
- data/tracks/coffeescript/exercises/bob/.meta/description.md +10 -0
- data/tracks/common-lisp/exercises/bob/.meta/description.md +10 -0
- data/tracks/cpp/exercises/bob/.meta/description.md +10 -0
- data/tracks/crystal/exercises/triangle/README.md +52 -0
- data/tracks/csharp/exercises/complex-numbers/README.md +44 -0
- data/tracks/d/exercises/bob/.meta/description.md +10 -0
- data/tracks/dart/exercises/bob/.meta/description.md +10 -0
- data/tracks/dart/exercises/bob/README.md +0 -1
- data/tracks/ecmascript/exercises/bob/.meta/description.md +10 -0
- data/tracks/ecmascript/exercises/bob/README.md +1 -1
- data/tracks/elisp/config/exercise_readme.go.tmpl +0 -3
- data/tracks/elm/exercises/bob/.meta/description.md +10 -0
- data/tracks/elm/exercises/collatz-conjecture/README.md +63 -0
- data/tracks/erlang/exercises/bob/.meta/description.md +10 -0
- data/tracks/erlang/exercises/complex-numbers/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/erlang/exercises/robot-simulator/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/fortran/config/exercise_readme.go.tmpl +0 -3
- data/tracks/fsharp/exercises/clock/ClockTest.fs +9 -9
- data/tracks/fsharp/exercises/kindergarten-garden/KindergartenGardenTest.fs +1 -1
- data/tracks/fsharp/exercises/ocr-numbers/OcrNumbersTest.fs +35 -35
- data/tracks/fsharp/exercises/palindrome-products/PalindromeProductsTest.fs +1 -1
- data/tracks/fsharp/exercises/poker/PokerTest.fs +57 -57
- data/tracks/fsharp/exercises/prime-factors/PrimeFactorsTest.fs +1 -1
- data/tracks/fsharp/exercises/protein-translation/ProteinTranslationTest.fs +1 -1
- data/tracks/fsharp/exercises/proverb/ProverbTest.fs +13 -13
- data/tracks/fsharp/exercises/queen-attack/QueenAttackTest.fs +1 -1
- data/tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipherTest.fs +1 -1
- data/tracks/fsharp/exercises/raindrops/RaindropsTest.fs +1 -1
- data/tracks/fsharp/exercises/rectangles/RectanglesTest.fs +70 -70
- data/tracks/fsharp/exercises/reverse-string/ReverseStringTest.fs +1 -1
- data/tracks/fsharp/exercises/robot-simulator/RobotSimulatorTest.fs +1 -1
- data/tracks/fsharp/exercises/roman-numerals/RomanNumeralsTest.fs +5 -1
- data/tracks/fsharp/exercises/run-length-encoding/RunLengthEncodingTest.fs +1 -1
- data/tracks/fsharp/exercises/word-count/Example.fs +1 -1
- data/tracks/fsharp/exercises/word-count/WordCount.fs +1 -1
- data/tracks/fsharp/exercises/word-count/WordCountTest.fs +12 -12
- data/tracks/fsharp/generators/Generators.fs +26 -40
- data/tracks/gnu-apl/config/exercise_readme.go.tmpl +0 -3
- data/tracks/go/exercises/armstrong-numbers/README.md +36 -0
- data/tracks/go/exercises/two-bucket/.meta/hints.md +23 -3
- data/tracks/go/exercises/two-bucket/README.md +23 -3
- data/tracks/go/exercises/two-bucket/bonus_test.go +22 -0
- data/tracks/go/exercises/two-bucket/example.go +9 -5
- data/tracks/go/exercises/two-bucket/two_bucket_test.go +31 -27
- data/tracks/haxe/config/exercise_readme.go.tmpl +0 -3
- data/tracks/haxe/exercises/leap/README.md +33 -0
- data/tracks/java/exercises/parallel-letter-frequency/.meta/{HINTS.md → hints.md} +0 -0
- data/tracks/java/exercises/protein-translation/README.md +2 -2
- data/tracks/lfe/exercises/bob/.meta/description.md +10 -0
- data/tracks/nim/config/exercise_readme.go.tmpl +0 -3
- data/tracks/objective-c/exercises/collatz-conjecture/README.md +50 -0
- data/tracks/objective-c/exercises/grains/README.md +50 -0
- data/tracks/objective-c/exercises/nth-prime/README.md +32 -0
- data/tracks/objective-c/exercises/say/README.md +86 -0
- data/tracks/objective-c/exercises/two-fer/README.md +36 -0
- data/tracks/php/exercises/collatz-conjecture/README.md +48 -0
- data/tracks/php/exercises/crypto-square/README.md +91 -0
- data/tracks/php/exercises/flatten-array/README.md +32 -0
- data/tracks/php/exercises/transpose/README.md +80 -0
- data/tracks/plsql/exercises/hello-world/README.md +41 -0
- data/tracks/powershell/config/exercise_readme.go.tmpl +0 -3
- data/tracks/prolog/config/exercise_readme.go.tmpl +0 -3
- data/tracks/python/exercises/bowling/README.md +92 -0
- data/tracks/r/config.json +12 -1
- data/tracks/r/exercises/bob/.meta/description.md +10 -0
- data/tracks/r/exercises/diamond/README.md +69 -0
- data/tracks/r/exercises/diamond/diamond.R +3 -0
- data/tracks/r/exercises/diamond/example.R +15 -0
- data/tracks/r/exercises/diamond/test_diamond.R +90 -0
- data/tracks/scala/exercises/bob/.meta/description.md +10 -0
- data/tracks/sml/exercises/bob/.meta/description.md +10 -0
- data/tracks/swift/exercises/rotational-cipher/README.md +45 -0
- data/tracks/typescript/exercises/bob/.meta/description.md +10 -0
- data/tracks/vbnet/exercises/bob/.meta/description.md +10 -0
- data/tracks/vimscript/exercises/bob/.meta/description.md +10 -0
- metadata +70 -38
- data/tracks/elisp/docs/EXERCISE_README_INSERT.md +0 -0
- data/tracks/fortran/docs/EXERCISE_README_INSERT.md +0 -0
- data/tracks/gnu-apl/config/exercise-readme-insert.md +0 -0
- data/tracks/haxe/docs/EXERCISE_README_INSERT.md +0 -0
- data/tracks/nim/docs/EXERCISE_README_INSERT.md +0 -0
- data/tracks/powershell/docs/EXERCISE_README_INSERT.md +0 -0
- data/tracks/prolog/docs/EXERCISE_README_INSERT.md +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f104813d68f8ffd902c9177cd9a100fce62d9bea
|
4
|
+
data.tar.gz: fb22d249344065d92e7e6170566999a3285bea44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 482c7f9e2b63ddd4a37b3fa25612c2e0b6e595dd8b8a6bf05803f620f0f73448346e82b67f3979e4692885f95f5e360fed774419d24ab0ead696496f3e77ae96
|
7
|
+
data.tar.gz: d38f80a6ad8b974e6c5ece5b89414ff2f52d08a7ee99bbeaa759ae949bd484264279e16d08394c844c18344d0333ab8338c7b71aa66a64b5b3988ab8d2150717
|
data/lib/trackler/version.rb
CHANGED
@@ -0,0 +1,10 @@
|
|
1
|
+
Bob is a lackadaisical teenager. In conversation, his responses are very limited.
|
2
|
+
|
3
|
+
Bob answers 'Sure.' if you ask him a question.
|
4
|
+
|
5
|
+
He answers 'Whoa, chill out!' if you yell at him.
|
6
|
+
|
7
|
+
He says 'Fine. Be that way!' if you address him without actually saying
|
8
|
+
anything.
|
9
|
+
|
10
|
+
He answers 'Whatever.' to anything else.
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,10 @@
|
|
1
|
+
Bob is a lackadaisical teenager. In conversation, his responses are very limited.
|
2
|
+
|
3
|
+
Bob answers 'Sure.' if you ask him a question.
|
4
|
+
|
5
|
+
He answers 'Whoa, chill out!' if you yell at him.
|
6
|
+
|
7
|
+
He says 'Fine. Be that way!' if you address him without actually saying
|
8
|
+
anything.
|
9
|
+
|
10
|
+
He answers 'Whatever.' to anything else.
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,10 @@
|
|
1
|
+
Bob is a lackadaisical teenager. In conversation, his responses are very limited.
|
2
|
+
|
3
|
+
Bob answers 'Sure.' if you ask him a question.
|
4
|
+
|
5
|
+
He answers 'Whoa, chill out!' if you yell at him.
|
6
|
+
|
7
|
+
He says 'Fine. Be that way!' if you address him without actually saying
|
8
|
+
anything.
|
9
|
+
|
10
|
+
He answers 'Whatever.' to anything else.
|
@@ -0,0 +1,10 @@
|
|
1
|
+
Bob is a lackadaisical teenager. In conversation, his responses are very limited.
|
2
|
+
|
3
|
+
Bob answers 'Sure.' if you ask him a question.
|
4
|
+
|
5
|
+
He answers 'Whoa, chill out!' if you yell at him.
|
6
|
+
|
7
|
+
He says 'Fine. Be that way!' if you address him without actually saying
|
8
|
+
anything.
|
9
|
+
|
10
|
+
He answers 'Whatever.' to anything else.
|
@@ -0,0 +1,10 @@
|
|
1
|
+
Bob is a lackadaisical teenager. In conversation, his responses are very limited.
|
2
|
+
|
3
|
+
Bob answers 'Sure.' if you ask him a question.
|
4
|
+
|
5
|
+
He answers 'Whoa, chill out!' if you yell at him.
|
6
|
+
|
7
|
+
He says 'Fine. Be that way!' if you address him without actually saying
|
8
|
+
anything.
|
9
|
+
|
10
|
+
He answers 'Whatever.' to anything else.
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# Triangle
|
2
|
+
|
3
|
+
Determine if a triangle is equilateral, isosceles, or scalene.
|
4
|
+
|
5
|
+
An _equilateral_ triangle has all three sides the same length.
|
6
|
+
|
7
|
+
An _isosceles_ triangle has at least two sides the same length. (It is sometimes
|
8
|
+
specified as having exactly two sides the same length, but for the purposes of
|
9
|
+
this exercise we'll say at least two.)
|
10
|
+
|
11
|
+
A _scalene_ triangle has all sides of different lengths.
|
12
|
+
|
13
|
+
## Note
|
14
|
+
|
15
|
+
For a shape to be a triangle at all, all sides have to be of length > 0, and
|
16
|
+
the sum of the lengths of any two sides must be greater than or equal to the
|
17
|
+
length of the third side. See [Triangle Inequality](https://en.wikipedia.org/wiki/Triangle_inequality).
|
18
|
+
|
19
|
+
## Dig Deeper
|
20
|
+
|
21
|
+
The case where the sum of the lengths of two sides _equals_ that of the
|
22
|
+
third is known as a _degenerate_ triangle - it has zero area and looks like
|
23
|
+
a single line. Feel free to add your own code/tests to check for degenerate triangles.
|
24
|
+
|
25
|
+
## Setup
|
26
|
+
|
27
|
+
Follow the setup instructions for Crystal here:
|
28
|
+
|
29
|
+
http://exercism.io/languages/crystal
|
30
|
+
|
31
|
+
More help installing can be found here:
|
32
|
+
|
33
|
+
http://crystal-lang.org/docs/installation/index.html
|
34
|
+
|
35
|
+
## Making the Test Suit Pass
|
36
|
+
|
37
|
+
Execute the tests with:
|
38
|
+
|
39
|
+
```bash
|
40
|
+
$ crystal spec
|
41
|
+
```
|
42
|
+
|
43
|
+
In each test suite all but the first test have been skipped.
|
44
|
+
|
45
|
+
Once you get a test passing, you can unskip the next one by changing `pending` to `it`.
|
46
|
+
|
47
|
+
## Source
|
48
|
+
|
49
|
+
The Ruby Koans triangle project, parts 1 & 2 [http://rubykoans.com](http://rubykoans.com)
|
50
|
+
|
51
|
+
## Submitting Incomplete Solutions
|
52
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# Complex Numbers
|
2
|
+
|
3
|
+
A complex number is a number in the form `a + b * i` where `a` and `b` are real and `i` satisfies `i^2 = -1`.
|
4
|
+
|
5
|
+
`a` is called the real part and `b` is called the imaginary part of `z`.
|
6
|
+
The conjugate of the number `a + b * i` is the number `a - b * i`.
|
7
|
+
The absolute value of a complex number `z = a + b * i` is a real number `|z| = sqrt(a^2 + b^2)`. The square of the absolute value `|z|^2` is the result of multiplication of `z` by its complex conjugate.
|
8
|
+
|
9
|
+
The sum/difference of two complex numbers involves adding/subtracting their real and imaginary parts separately:
|
10
|
+
`(a + i * b) + (c + i * d) = (a + c) + (b + d) * i`,
|
11
|
+
`(a + i * b) - (c + i * d) = (a - c) + (b - d) * i`.
|
12
|
+
|
13
|
+
Multiplication result is by definition
|
14
|
+
`(a + i * b) * (c + i * d) = (a * c - b * d) + (b * c + a * d) * i`.
|
15
|
+
|
16
|
+
The reciprocal of a non-zero complex number is
|
17
|
+
`1 / (a + i * b) = a/(a^2 + b^2) - b/(a^2 + b^2) * i`.
|
18
|
+
|
19
|
+
Dividing a complex number `a + i * b` by another `c + i * d` gives:
|
20
|
+
`(a + i * b) / (c + i * d) = (a * c + b * d)/(c^2 + d^2) + (b * c - a * d)/(c^2 + d^2) * i`.
|
21
|
+
|
22
|
+
Exponent of a complex number can be expressed as
|
23
|
+
`exp(a + i * b) = exp(a) * exp(i * b)`,
|
24
|
+
and the last term is given by Euler's formula `exp(i * b) = cos(b) + i * sin(b)`.
|
25
|
+
|
26
|
+
|
27
|
+
Implement the following operations:
|
28
|
+
- addition, subtraction, multiplication and division of two complex numbers,
|
29
|
+
- conjugate, absolute value, exponent of a given complex number.
|
30
|
+
|
31
|
+
|
32
|
+
Assume the programming language you are using does not have an implementation of complex numbers.
|
33
|
+
|
34
|
+
### Submitting Exercises
|
35
|
+
|
36
|
+
Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/<exerciseName>` directory.
|
37
|
+
|
38
|
+
For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/csharp/bob/bob.cs`.
|
39
|
+
## Source
|
40
|
+
|
41
|
+
Wikipedia [https://en.wikipedia.org/wiki/Complex_number](https://en.wikipedia.org/wiki/Complex_number)
|
42
|
+
|
43
|
+
## Submitting Incomplete Solutions
|
44
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,10 @@
|
|
1
|
+
Bob is a lackadaisical teenager. In conversation, his responses are very limited.
|
2
|
+
|
3
|
+
Bob answers 'Sure.' if you ask him a question.
|
4
|
+
|
5
|
+
He answers 'Whoa, chill out!' if you yell at him.
|
6
|
+
|
7
|
+
He says 'Fine. Be that way!' if you address him without actually saying
|
8
|
+
anything.
|
9
|
+
|
10
|
+
He answers 'Whatever.' to anything else.
|
@@ -0,0 +1,10 @@
|
|
1
|
+
Bob is a lackadaisical teenager. In conversation, his responses are very limited.
|
2
|
+
|
3
|
+
Bob answers 'Sure.' if you ask him a question.
|
4
|
+
|
5
|
+
He answers 'Whoa, chill out!' if you yell at him.
|
6
|
+
|
7
|
+
He says 'Fine. Be that way!' if you address him without actually saying
|
8
|
+
anything.
|
9
|
+
|
10
|
+
He answers 'Whatever.' to anything else.
|
@@ -20,7 +20,6 @@ $ pub run test
|
|
20
20
|
|
21
21
|
For more detailed info about the Dart track see the [help page](http://exercism.io/languages/dart).
|
22
22
|
|
23
|
-
|
24
23
|
## Source
|
25
24
|
|
26
25
|
Inspired by the 'Deaf Grandma' exercise in Chris Pine's Learn to Program tutorial. [http://pine.fm/LearnToProgram/?Chapter=06](http://pine.fm/LearnToProgram/?Chapter=06)
|
@@ -0,0 +1,10 @@
|
|
1
|
+
Bob is a lackadaisical teenager. In conversation, his responses are very limited.
|
2
|
+
|
3
|
+
Bob answers 'Sure.' if you ask him a question.
|
4
|
+
|
5
|
+
He answers 'Whoa, chill out!' if you yell at him.
|
6
|
+
|
7
|
+
He says 'Fine. Be that way!' if you address him without actually saying
|
8
|
+
anything.
|
9
|
+
|
10
|
+
He answers 'Whatever.' to anything else.
|
@@ -16,7 +16,7 @@ He answers 'Whatever.' to anything else.
|
|
16
16
|
Go through the setup instructions for ECMAScript to
|
17
17
|
install the necessary dependencies:
|
18
18
|
|
19
|
-
http://exercism.io/languages/ecmascript
|
19
|
+
http://exercism.io/languages/ecmascript
|
20
20
|
|
21
21
|
## Requirements
|
22
22
|
|
@@ -0,0 +1,10 @@
|
|
1
|
+
Bob is a lackadaisical teenager. In conversation, his responses are very limited.
|
2
|
+
|
3
|
+
Bob answers 'Sure.' if you ask him a question.
|
4
|
+
|
5
|
+
He answers 'Whoa, chill out!' if you yell at him.
|
6
|
+
|
7
|
+
He says 'Fine. Be that way!' if you address him without actually saying
|
8
|
+
anything.
|
9
|
+
|
10
|
+
He answers 'Whatever.' to anything else.
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# Collatz Conjecture
|
2
|
+
|
3
|
+
The Collatz Conjecture or 3x+1 problem can be summarized as follows:
|
4
|
+
|
5
|
+
Take any positive integer n. If n is even, divide n by 2 to get n / 2. If n is
|
6
|
+
odd, multiply n by 3 and add 1 to get 3n + 1. Repeat the process indefinitely.
|
7
|
+
The conjecture states that no matter which number you start with, you will
|
8
|
+
always reach 1 eventually.
|
9
|
+
|
10
|
+
Given a number n, return the number of steps required to reach 1.
|
11
|
+
|
12
|
+
## Examples
|
13
|
+
|
14
|
+
Starting with n = 12, the steps would be as follows:
|
15
|
+
|
16
|
+
0. 12
|
17
|
+
1. 6
|
18
|
+
2. 3
|
19
|
+
3. 10
|
20
|
+
4. 5
|
21
|
+
5. 16
|
22
|
+
6. 8
|
23
|
+
7. 4
|
24
|
+
8. 2
|
25
|
+
9. 1
|
26
|
+
|
27
|
+
Resulting in 9 steps. So for input n = 12, the return value would be 9.
|
28
|
+
|
29
|
+
## Elm Installation
|
30
|
+
|
31
|
+
Refer to the [Exercism help page](http://exercism.io/languages/elm) for Elm
|
32
|
+
installation and learning resources.
|
33
|
+
|
34
|
+
## Writing the Code
|
35
|
+
|
36
|
+
The first time you start an exercise, you'll need to ensure you have the
|
37
|
+
appropriate dependencies installed.
|
38
|
+
|
39
|
+
```bash
|
40
|
+
$ npm install
|
41
|
+
```
|
42
|
+
|
43
|
+
Execute the tests with:
|
44
|
+
|
45
|
+
```bash
|
46
|
+
$ npm test
|
47
|
+
```
|
48
|
+
|
49
|
+
Automatically run tests again when you save changes:
|
50
|
+
|
51
|
+
```bash
|
52
|
+
$ npm run watch
|
53
|
+
```
|
54
|
+
|
55
|
+
As you work your way through the test suite, be sure to remove the `skip <|`
|
56
|
+
calls from each test until you get them all passing!
|
57
|
+
|
58
|
+
## Source
|
59
|
+
|
60
|
+
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)
|
61
|
+
|
62
|
+
## Submitting Incomplete Solutions
|
63
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,10 @@
|
|
1
|
+
Bob is a lackadaisical teenager. In conversation, his responses are very limited.
|
2
|
+
|
3
|
+
Bob answers 'Sure.' if you ask him a question.
|
4
|
+
|
5
|
+
He answers 'Whoa, chill out!' if you yell at him.
|
6
|
+
|
7
|
+
He says 'Fine. Be that way!' if you address him without actually saying
|
8
|
+
anything.
|
9
|
+
|
10
|
+
He answers 'Whatever.' to anything else.
|
File without changes
|
File without changes
|
@@ -1,4 +1,4 @@
|
|
1
|
-
// This file was auto-generated based on version
|
1
|
+
// This file was auto-generated based on version 2.2.1 of the canonical data.
|
2
2
|
|
3
3
|
module ClockTest
|
4
4
|
|
@@ -145,42 +145,42 @@ let ``Add more than two days`` () =
|
|
145
145
|
[<Fact(Skip = "Remove to run test")>]
|
146
146
|
let ``Subtract minutes`` () =
|
147
147
|
let clock = create 10 3
|
148
|
-
|
148
|
+
subtract 3 clock |> display |> should equal "10:00"
|
149
149
|
|
150
150
|
[<Fact(Skip = "Remove to run test")>]
|
151
151
|
let ``Subtract to previous hour`` () =
|
152
152
|
let clock = create 10 3
|
153
|
-
|
153
|
+
subtract 30 clock |> display |> should equal "09:33"
|
154
154
|
|
155
155
|
[<Fact(Skip = "Remove to run test")>]
|
156
156
|
let ``Subtract more than an hour`` () =
|
157
157
|
let clock = create 10 3
|
158
|
-
|
158
|
+
subtract 70 clock |> display |> should equal "08:53"
|
159
159
|
|
160
160
|
[<Fact(Skip = "Remove to run test")>]
|
161
161
|
let ``Subtract across midnight`` () =
|
162
162
|
let clock = create 0 3
|
163
|
-
|
163
|
+
subtract 4 clock |> display |> should equal "23:59"
|
164
164
|
|
165
165
|
[<Fact(Skip = "Remove to run test")>]
|
166
166
|
let ``Subtract more than two hours`` () =
|
167
167
|
let clock = create 0 0
|
168
|
-
|
168
|
+
subtract 160 clock |> display |> should equal "21:20"
|
169
169
|
|
170
170
|
[<Fact(Skip = "Remove to run test")>]
|
171
171
|
let ``Subtract more than two hours with borrow`` () =
|
172
172
|
let clock = create 6 15
|
173
|
-
|
173
|
+
subtract 160 clock |> display |> should equal "03:35"
|
174
174
|
|
175
175
|
[<Fact(Skip = "Remove to run test")>]
|
176
176
|
let ``Subtract more than one day (1500 min = 25 hrs)`` () =
|
177
177
|
let clock = create 5 32
|
178
|
-
|
178
|
+
subtract 1500 clock |> display |> should equal "04:32"
|
179
179
|
|
180
180
|
[<Fact(Skip = "Remove to run test")>]
|
181
181
|
let ``Subtract more than two days`` () =
|
182
182
|
let clock = create 2 20
|
183
|
-
|
183
|
+
subtract 3000 clock |> display |> should equal "00:20"
|
184
184
|
|
185
185
|
[<Fact(Skip = "Remove to run test")>]
|
186
186
|
let ``Clocks with same time`` () =
|