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.
When you press the "Test" button, you are running the Sample Tests, which by default in this Kata only checks if you return a negative number when the input is positive.
If you read the Kata description again, you might notice that if the number is already negative you still need to return a negative number.
I prefer to have the initial Sample Tests be simple, so you can learn to write your own Sample Tests. I don't know which programming language you are using, but the Sample Tests should be easy to edit.
When you press the "Attempt" button you will instead run the secret tests. They are designed to validate your code with edge-case tests and some random tests so you can't cheat your way through it by guessing the tests.
The output of the failed tests should also show you what your code returned verse what you were supposed to return. The names of the tests that failed might also be a hint as to what might have failed.
I don't know which programming language you are asking about.
This Discorse section is only for discussion about this kata itself, if you want help for the specific programming language or programming in general I suggest asking a better place. You could check out the Codewars Discord server for example.
Read this: https://docs.codewars.com/training/troubleshooting/#test-attempt
Hi! im new at codewars, figuring out how to use it and learning to program. This is the first excercise im doing here and i don't understand why if i put "test" and everything turns to be ok, when i select "atempt" it says i failed. I may have failed as im new at this, but i would like to understand whats the difference between one and the other.