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 comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
So much missed potential...
etc.
Oh, and please add apostorphes! (like
"dont"
)Fixed
This comment is hidden because it contains spoiler information about the solution
It is bad practice to create a list in the sum function. A generator will not allocate memory. Also, I find x and y to be better names for points in this, i.e. math, domain.
Using package not in the standard python library like numpy, to test others is not very good.
I think we come here to train language , not the special library.
I added a test to see if the returned object is of the correct class.
thanks. i really like list comprehensions and generator expressions so i wanted to apply them to this case.
I knew someone would come up with a very clever solution... but a one liner for this? Im trully impressed.
Very impressive solution! Took me a while to understand how it works but when it clicked i was amazed by the simple but effective idea. Also, very good use of numpy arrays.
Nice! I love one liners. Expecially when they are an upgrade with no downsides like this one.
Something like this: array.map(el => el). No printing, just visiting each element and returning it.
Edit: accidental double post due to slow site
Test 5 in the default example tests is indeed correct.
Read the description more carefully.
Loading more items...