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.
Duplicate of this kata
Added.
If you are going to raise an issue about duplicates :
This comment is hidden because it contains spoiler information about the solution
This is the same as any GCD kata.
Duplicate issue.
This is very language dependent.
Added test.
Needs random test cases
A few of the solutions are wrong. For example: I got one wrong that said
"Testing for -221.71428571428572
It should work for random inputs too - Expected: false, instead got: true"
but the instructions say "For negative numbers, return true if its absolute value is odd.
For decimal numbers, return true only if the number is equal to its integer part and the integer part is odd."
so.. If the “number is equal to its integer part” this is -221 AND the absolute value is 221 this is odd. It should be true! My function got it correct you expect the wrong thing. This happened a few times, please either fix your instructions or fix your test. Thanks
It would have been nice to know we were going to be dealing with larger numbers. I am new to coding and wrote a working code for smaller numbers and then had to alter this to make it work for large numbers. If I knew from the beginning I was going to be working with larger arrays that wouldn't not respond well when converted to integers I could have approached the problem differently.
Definitely a level 8
Using if statements is level 7. It's great that you don't find it a challenge, but the kata is appropriate for level 8 "Defining a simple function (i.e. hello world)."
This is fun and the code works fine but it doesn't involve any challenge. There are no example test but really doesn't need example tests when there is not challenge. What if someone input 8 as the roll? maybe it should have an error or something. You don't even need an if, roll is betweeen 1-6 test to make this work
I guess I don't know what I am doing. How do I add random tests?
Loading more items...