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.
Nice one,
I had difficulties fixing it though.
"...create more quadrants"
um, wat? how? anyway, it will not return a number, it will return 'None'
While it's short, what would happen if someone goes beyond inserting 12? It will return a number and create more quadrants. It might be the tidiest, shortest or even the fastest and it's quite enough for the exercise/instructions at hand, but the solution above seems to be more grounded to me.
But at the end of the day I'm just a beginner.
This is a lot of code... You can use math or use something similar to my solution as well
This comment is hidden because it contains spoiler information about the solution
Unless performance is an issue, this code is much more readable. Any programmer can look at it and instantly tell you exactly what's going on.
I'm with you on that, this is what we might call a "naive" solution: very intuitive, but not always optimal. I haven't done any testing on these solutions but I'm certain the integer division is faster.
I don't know why it's voted Best Practices, but sometimes that happens on some of the lower-ranked kata. (Nothing against this solution or lower-ranked users, just stating the facts)
Also welcome! Always glad to see new people getting started with programming.