Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Haskell translation
.
added to C#
rewrote
Point
to be a modern JSclass
withx
andy
being getters to access private properties#x
and#y
. I added getters namedX
andY
for backwards-compatibility.assertions should use
assert.approx_equals()
added your random tests + extracted all assertions to a wrapper that takes care of approximate equality + displaying the input
This comment is hidden because it contains spoiler information about the solution
Approved
python new test framework is required. updated in this fork
This comment is hidden because it contains spoiler information about the solution
do you have to use trig to solve this?
Because we are dealing with integers, C# division or modulus by zero already throws a DivideByZeroException. There's no need to explicitly build and throw one. If we were using floats or doubles, we would get one of the infinities (or in the case of 0.0 / 0.0 or 0.0 % 0.0, NaN) as a result and would need to do further work to handle that.
Elixir translation ready for review and approval.
It wasn't difficult. Trouble with the input data, but otherwise, it's simple.
Misleading example. Example is array of arrays, but the tests are done with array of objects.
Yes, it is explained at the bottom, but still unnecessarily misleading. I think it would better if these were consistent - i.e. the example should show objects, or the tests should test an array of arrays as the argument.
Edit: I should add my comment is for the Javascript variation.
Loading more items...