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.
It's a pleasure to see so clean code! I learn a lot thanks to You. Thanks bro.
niubi, clear boy
Good job! My answer was so messy xD
thank you :D
OMG, I love your solution! You're very patient
Gosh I feel dumb.
This is an old comment, but just in case someone else is puzzled reading it... The % operator in C and C-based languages like C++, Java and C#, is not a true "modulo operator". It's a remainder from integer division that truncates toward 0, so that nonzero values of x % y will have the same sign as x.
Many other languages use a remainder from floor division, where nonzero values of x % y have the same sign as y. So n%10 always gives the least positive remainder from dividing n / 10. In this case, that makes:
This problem is one of the rare cases (in my experience) where C-style remainders simplify code. Usually there's no difference, but when there is I find that I have to adjust for the difference more often in C than in Python or Ruby.
Nice solution
lol
If you study mathematics or like math in general, the math related katas are fun.
If you are searching for a job or you are about to take a test, you are more stressed to learn and you're interested in the "useful" ones, so math related katas can be annoying in that case.
I had similar issues in the past. The thing that helped me was filtering katas, on the left part of the screen, select the appropriate tags.
How does it work?
Don't forget: Each declared variable needs space in memory (stack or heap). In this kata, you might use three different vars but in real life projects with millions of code and thousands of vars, that solution might be best practise (depends on your team and the concrete project / requirements).
Apparently the computer understands it better if the code is all on one line.
Yeah you are right, that's my bad I apologize. Honestly I was just frustrated because I have a class on SQL coming up so I'm trying to learn it, and I go to do one of these challenges, and find the sql function or w/e that seems like it would do the job, and I plug it in using the same syntax I see on w3schools or wherever I found the info, and the interpreter on here will tell me it doesn't recognize the function or something. That's what I had been doing before this challenge. I wish there was a setting that would not allow me to type anything if my blood pressure rises above a certain level, maybe I should look into that. Clearly there is something I am still doing wrong with the SQL, but it is frustrating. Anyway, just wanted to say that since I'm not able to just delete my comment...
Programming is a very wide field. Yes, you can do alot of programming without much math knowledge, but that is only because you are using a lot of libraries that do the math for you. Somebody has to write all these libraries and they need to know all this "useless math crap". So, please don't be ignorant and recognize the actual usefullness of these katas.
If you don't want to dive into this sort of programming just skip those katas.
Loading more items...