clojure icon indicating copy to clipboard operation
clojure copied to clipboard

"say" exercise doesn't use "and" in hundreds

Open Grazfather opened this issue 5 years ago • 1 comments

We explicitly have a test:

(deftest one-hundred-twenty-three-test
  (is (= "one hundred twenty-three" (say/number 123))))

But in the description:

  • 14 becomes "fourteen".
  • 100 becomes "one hundred".
  • 120 becomes "one hundred and twenty".
  • 1002 becomes "one thousand and two".
  • 1323 becomes "one thousand three hundred and twenty-three".

Seems are tests are much simpler (the examples conditionally add and between thousands or hundreds, depending on the value).

Grazfather avatar Dec 07 '20 00:12 Grazfather

Indeed, a look at the problem specs shows that the test is correct, so the description should be changed accordingly.

EDIT: Wait... now I think I get it. The section in question ("Extensions") is only meant to be a suggested optional exercise (extension) for the student, not a description of the exercise itself. Still, I find that to be confusing and in the PR I just removed that part.

bobbicodes avatar Feb 07 '21 03:02 bobbicodes