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 3! FINALLY (: Thank you so much!
Dude, LPTHW is a way outdated book. A lot of people used it, and yeah it was good for its time. Trust me, I worked through the entire book one year ago. You WILL face a lot of problems trying to do the exercises when trying to download and install the packages recommended by the book because it was written so long ago. I have abandoned Python 2 and moved to Python 3, which has much better support.
This comment is hidden because it contains spoiler information about the solution
Readable would be nice (:
This comment is hidden because it contains spoiler information about the solution
just wondering, where in this solution does the block return true or false to update @items_processed?
This comment is hidden because it contains spoiler information about the solution
Well, this works for the test data, but it does not filter out input which do not refer to Christmas day.
This comment is hidden because it contains spoiler information about the solution
I'm a beginner too, starting out in Ruby as my first language. However, before starting on Codewars, I completed the entire 9-hour length tutorial on Codecademy, as well as had some experience in trying to write some simple methods.
I feel like Codewars really is a place to test your skills and find out your limits while trying to push them and learn about better ways to code than the ways you are used to. It acts as a supplement for your own learning of the language(s) (full blown-out tutorial series, or books/manuals) rather than replacing it altogether. So, if you find that you are starting to have trouble with katas frequently, it means you have to start doing some homework I guess? (which is the state I'm approaching now)
After all, you don't go to battle without first sharpening your weapons! (or firming up your moves)
You're right! Sometimes I wonder if it's better to just use return whenever we intend for a line to return a result.
For short codes like this it's easy to spot when a line is meant to return even though it does not have the 'return' at the start of the line. But for longer codes and re-edited codes written over more than one sitting perhaps it's just better to use 'return' all the time as intended.
P.S. I still do not get how to make code segments appear nicely in the comments.
This comment is hidden because it contains spoiler information about the solution
I like your version. It's simple, clean, and straightfoward.
Personally, I would prefer it a little more if the 'if' and 'else' statements were condensed into two lines:
"#{names[0..-2].join(', ')} & #{names.last}" if names.length > 1
names.last
Works, but wouldn't (name.length-1) be more accurate?