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.
Yeah, this platform is fun for experienced programmers trying out new problems or crowdsourcing interesting challenges, but for learning and going through a curriculum that, say, prepares for coding interviews, I've been really impressed with codesignal.
@FArekkusu, please try to remember that we were all beginners at one point, so it's better to keep comments positive and constructive.
@TheGeekZeus, it looks like you might be getting confused between lists and strings, and it would help to refresh on some basics, like if-statements. Googleing for python tutorials can be overwhelming, but a few good ones are https://pythonbasics.org/ and http://www.learnpython.org/ . Once you've gone through these, you might find the official python tutorial easier to follow: https://docs.python.org/3/tutorial/
I agree that codewars isn't the right format for an intro to programming, but I wanted to experiment with that concept a few years ago when I created this. It was originally as supplementary exercises for RailsSchool, but has evolved over time to be more of a simple standalone exercise.
It's actually frustrating and embarassing as the author that this is the most popular thing I've done on codewars, like how the obvious simple questions+answers on stackoverflow get the most votes, but that's just how this community works :/
Regarding if this is too easy for an 8kyu, I can see your point here, but on the flipside, 80% of 419 votes have rated it positively and it's been translated to several languages and solved several thousand times, so the community seems to have spoken. Also, it fits under the guidelines ( https://docs.google.com/document/d/1eseD5xyhGdtQ-DaWdqfK2yf6mvTDWHWEpkQGBppI8cw/edit ) as a fundamental language feature. Personally, I think it's okay for 8kyu questions to range from ridiculously easy to fairly easy.
In most of the languages, it should be lowercase
true
, but in at least Python, it should be the capitalizedTrue
. Unfortunately, we can't have a different description per language. Any suggestions for how to handle this discrepancy?This comment is hidden because it contains spoiler information about the solution
The description says that this function "returns two-dimensional array where numbers from 1 to N should be represented as clockwise spiral," but it should be "numbers from 1 to N2"
Good point! I updated the 2nd paragraph to add this.
I've updated the example solution for ruby to include randomness. It also includes a solution to the kata itself, but if a beginner can figure that out from the test code, then more power to them!
I wasn't able to update the official solution, because it's locked.
That's an awesome hack! It seems overkill for such a simple kata, but then again, that's the whole point of this site, so... challenge accepted!
Thanks for pointing this out. I've updated the description to be more language neutral.
I first intended this kata to be a nice standalone introduction to programming in ruby, but a limitation of these katas is that the same description has to be used for all languages. After finding this out the hard way (translated the description to Java and realized I borked the ruby one), I've edited it to be nice and minimal, introducing the core concepts of most languages quickly.
Thanks for this translation and sorry it took me so long to get to it. I forked it and removed all mentions of ruby.
Thanks for the feedback. I updated the second example to make this clearer, rather than just having a test case for it.
Thanks for translating this. It looks great!
This was intended as a first introduction to ruby, for people who've never dealt with the syntax before. Can you offer some suggestions for how to cut down / alter the text while still being beginner-friendly?