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.
@Gabriel.Chan you need to write a function named
i_or_f
to pass the kata. Your solution's function has a different name, so it is failing.Once you have corrected this you will find other issues with your solution.
Closing this issue as it's not a problem with the kata itself.
https://docs.codewars.com/authoring/guidelines/submission-tests
True if n > 0 else False
is an unnecessarily complicated version ofn > 0
.For consistency, if you wrap a bool expression, you should wrap all expressions:
True if n > 0 else False
->True if (True if n > 0 else False) else False
-> ...And why not
(1 if n == 1 else n) > 0
orTrue if (True if (0 if n == 0 else 1 if n == 1 else n) > 0 else False) else False
?How to add random tests
Why is if-else so bad
Something to do with an error importing i_or_f
What problems do you have exactly?
edit: your solution is wrong to begin with.
The test cases do not work, could someone copy paste the correct version in the reply section please.