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.
There is an issue in test case 1!!
Find another way to get an integer result.
I dont understand the error in random test, my code is in python, i use two casting requerided and i have this... I dont figure out
Testing for:
find_slope([19, 61, 45, -3])
It should work for random inputs too: '-2' should equal '-3'
Testing for:
find_slope([-1, 80, 74, 13])
It should work for random inputs too: '0' should equal '-1'
same here
This comment is hidden because it contains spoiler information about the solution
I could be wrong, but it seems that the random test outputs expect incorrect answers. For example, in cases where y1=y2 the slope should = 0 yet, the test expects -1? :/
Yet most random tests result in a decimal slope and expect an integer.
The arrays come in a random order, so your equation inputs may not be how you would expect.
By your code, assuming that a, b, c are in order to the array. It would appear like this:
Which would return False but expects True as it can be re-arranged into a different order which makes the equation true for a^2 + b^2 = c^2
This does not seem to be made correctly
This comment is hidden because it contains spoiler information about the solution
OP solved it, closing
Approved
python new test framework + random tests are required. updated in this fork
This comment is hidden because it contains spoiler information about the solution
Read the end of the description.
Loading more items...