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.
Probably the tests test that the return value matches the expected value using
==operator, and then(0==False) is Trueand(1==True) is True(I haven't written any test cases in Codewars, nor did I check how they're implemented, so that's why I'm saying probably).boolis a subclass ofint(i.e.issubclass(bool, int) is True), here's how boolean values and 0/1 integer values (and an arbitrary other integer value 2 for comparison) compare using==andisoperators:The comparisons above can be verified by running them in Python shell for example.
For more details check out PEP 285 – Adding a bool type
goat
This comment is hidden because it contains spoiler information about the solution
very good
Amazing. I'm liking this website so far and it's only my second kata.
Nice exercise to easy work with if & else and to make it clearer with return. I agree on the xomments that the 'help' is slighlty confusing more than helping.
Your solution does not solve the kata. It just accidentally passes the sample tests. Try e.g.
Not a kata issue.
The testRandoms seems to be inversed as it thought (120, 200) would return false; when it should have true, since the values don't match. The testExamples worked fine; just not the random one.
I did this with PHP.
a bit tricky but it's ok c:
only two lines and it took me more than five
dude mine is so so so much longer lol
Happy i used this method.
Boss!
very nice
This comment is hidden because it contains spoiler information about the solution
Loading more items...