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.
I didn't think the instructions were clear enough to be honest
I like this one! it's fairly obvious, but I hadn't seen that I could pass an initial value to the reduce function to prevent it breaking if the array passed in was empty.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
slightly repetitive
Instructions are incorrect. Random tests prevent it from working in javascript, but when resubmitted with same solution it works.
the solution expected is different to the actual solution
i get the same error, I assume this is an error with the kata?
quite a long winded attempt at an answer but I am unable to pass the final test.
It's quite a long winded attempt at a solution but my current code looks like this:
def power_of_4(number)
your code here
if number.is_a? String
false
elsif number == nil
false
elsif (number * 0.25) - (number * 0.25).round == 0
true
elsif number.class == String
false
else
false
end
end
can anyone advise if there is any cases I am missing?