Ad
  • Default User Avatar

    Very nice one!
    For those wondering, math used is actually very basic, dont overcomplicate it.

  • Default User Avatar

    Yeah, I can see it now, it would not let me before hahaha.
    I'm afraid same thing might be happening to many other Nim katas, though...

  • Default User Avatar

    The proc "dotest" was ill placed so the tests seemed to succeed (nevertheless the solution failed at te end). Modified. Unfortunately it seems that there is a problem in your code.

  • Default User Avatar

    All tests on Nim pass but I get this message

    /workspace/solution_tests.nim(75, 15) Warning: Number of spaces around '..<' is not consistent [Spacing]

    /workspace/solution_tests.nim(80, 15) Warning: Number of spaces around '..<' is not consistent [Spacing]

    /workspace/solution_tests.nim(92, 21) Warning: Number of spaces around '..<' is not consistent [Spacing]

    /workspace/solution_tests.nim(76, 21) Warning: Deprecated since v0.18.0; use 'rand' instead; random is deprecated [Deprecated]

    /workspace/solution_tests.nim(79, 17) Warning: Deprecated since v0.18.0; use 'rand' instead; random is deprecated [Deprecated]

    /workspace/solution_tests.nim(100, 7) template/generic instantiation of suite from here

    /workspace/solution_tests.nim(102, 34) Warning: Deprecated since v0.18.0; use 'rand' instead; random is deprecated [Deprecated]

    Error: execution of an external program failed: '/workspace/tests '

  • Custom User Avatar
  • Default User Avatar

    The proc "dotest" was at a wrong place. Modified. Your solution passes. Please give it a try! Thanks for your post.

  • Default User Avatar

    Checks fail in Nim for some reason, check(false) is passed as a complete test but then it crashes