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.
This is sub-optimal. By using "|", the code must evaluate both n % x and n % y, whereas just using "||" will save needing to calcuate the 2nd expression if the first is true.
This comment is hidden because it contains spoiler information about the solution
same
I guess it pays to be familiar with all the functions and methods python makes available. Which is why I am doing these exercises - to learn. And, failure is such a good teacher.
This comment is hidden because it contains spoiler information about the solution
I agree, the tests aren't aligned with the instructions so this passes when it should not. There is no check if a or b are numbers as outlined in the requirements
Could you explain how it works?
very clever. I forgot the only integers in binaries are 0 and 1.
it is not lol))
Easy to read
The whole point here is that it's not a list comprehension.
If it were a list comprehension, then the whole list would be built, and
all
would be called on it afterwards. But it's a generator comprehension, which produces elements lazily, one by one, as they are iterated over.This comment is hidden because it contains spoiler information about the solution
It doesn't pass, so this solution isn't correct
this should not work - as passing a non number into variable b will yield NaN ?
hey guys, can you explain why this one passes if for example a or b !== 'number'? Isn't that supposed to return us NaN for valid signs?
Loading more items...