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.
Python version has no tests and is throwing an error no matter what I have.
How would you use object() though?
How does this work ?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I am getting a -e:11: syntax error, unexpected tCONSTANT, expecting end-of-input
and theres nothing wrong
def alternate_sq_sum(array)
t = []
array.each_with_index do |a,i|
(i+1).even? ? t.push( a ** 2) : t.push(a)
end
t.reduce(:+)
end
My initial code draft works perfectly when I run the code in irb but when I do it on the codewars ruby environment. It seems to think that I am executing my "somefunction" call on each object in the array not the total array.
Thus I am getting a private method 'map' called for Integer error ...
Is it possible to add another environment to the website. I think that a GoLang environment would be very useful to add into the codewars society.
How long did it take you to get to this revised solution ??