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.
Isn't eval a dangerous method? You can easily execute any line of code using it, including malicious
Rounding doesn't work. (Even when it seems to work.)
It isn't. Rather, it's a incorrectly upvoted not-so-good practice.
Why is floor function a better practice than div function?
The Ruby Tester Code is at fault or the directions are wrong, I had to make sure that multiple spaces got replaced by a single space in the ID. This doesn't appear to be the directions. Other solutions did the same, I course corrected based on the failed tests.
You should never put any information which might give away the kata solution in the comments (without checking the "mark as having spoiler content" box) as they're visible to every one.
This comment is hidden because it contains spoiler information about the solution
Range
has a#sum
method, which will cover the 0 case on its own:(1..num).sum
works perfectlyOne for @nbeck
:D
Hahah this was a hilarious Kata! Thank you!
No matter how many Hairs the Random Test cases have, the tests expect the code to return clean in Ruby. All random test cases in Ruby are expecting "Clean!".
Read the article in Launch School "refernces-and-mutability-in-ruby"
It works, my solution was just a simple Math::PI equation.
For me the example was fine when i tried it. i will check again
Loading more items...