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.
The unit of
x
andphase
is not mentioned. They're apparently different (x
is in angular wavenumber,phase
is in radians)Duplicate.
Rounding is a bad idea. This is documented.
Also, this kata is a duplicate of this and this
Initial code has incorrect method signature:
should be
the assertion call, is over complicated for nothing and misleading:
test.expect
. If you keep something lik this, don't "hide" the fact/use the proper assertion toolassert_equals
already handles deep comparison, so don't use the absolute_test thing in the first placeIn the end:
test.assert_equals(actual, expected, message_showing_ONLY_the_input)
, and compute the expected result first.in absolute_test:
len(v1)!=v2
this will ALWAYS be True. => the function is wrong anywayHi,
sum of interior angles
is also a float and must be tested with approximate equality (for instance,(180-a)*n
doesn't pass, but180*n-a*n
does)Cheers
This comment is hidden because it contains spoiler information about the solution
Hi,
Cheers
Hi,
Well, what's the point in reinventing the wheel and making it a square on the way...?
In a normal world, one would just call to
nextprime()
as a method (which should benext_prime
, btw) and get the prime without ever using theprimes()
method. This would boil down to a somwhat elipsoid wheel, and to make it round again, you'd just throw away the entire class and use what you put in there.Summary: the setup is 100% artificial, hence "not good". In addition to that, the task really lacks interest (primes have been done again and again... and again... and again-again...).
Cheers
Hi,
@test.it
are leaves. All tests blocks above those should bedescribe
blocks->cartesion
cartesian
cheers
Floats should be compared with
test.assert_approx_equals
.This comment is hidden because it contains spoiler information about the solution
Loading more items...