The $ is just a character in the string. Is there a reason you think it would need to be escaped?
How come the $ does not need to be escaped in this solution?
This comment is hidden because it contains spoiler information about the solution
I agree with waldnzwrld. that is not the porpus of this kata.
I'd .round(2) just once, wrapping all the return sentence. Otherwise, I liked it!
.round(2)
the ^ is a logical xor not a bitwise xor
this is the best
Thanks
This is the so called "ternary operator": http://www.w3resource.com/ruby/ruby-ternary-operator.php
condition ? something : something-else
is a shortcut for:
if condition something else something-else end
what does ? and : mean in ruby
Hehe, sorry, I thought perfect square would be enough. It's fixed now.
The instructions should be more explicit about the number being passed in, and the condition that it must result in a whole number when the square root is calculated.
Loading collection data...
The $ is just a character in the string. Is there a reason you think it would need to be escaped?
How come the $ does not need to be escaped in this solution?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I agree with waldnzwrld. that is not the porpus of this kata.
I'd
.round(2)
just once, wrapping all the return sentence. Otherwise, I liked it!the ^ is a logical xor not a bitwise xor
this is the best
Thanks
This is the so called "ternary operator":
http://www.w3resource.com/ruby/ruby-ternary-operator.php
is a shortcut for:
what does ? and : mean in ruby
Hehe, sorry, I thought perfect square would be enough. It's fixed now.
The instructions should be more explicit about the number being passed in, and the condition that it must result in a whole number when the square root is calculated.