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.
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.
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?
Thank you! The down vote was appropriate, I didn't realize there was example solutions I needed to put in so they are there now but were not before.
Hey Matt! Thanks for the feedback. This is the first one I have made so I will add those things and I appreciate you letting me know.
I am a beginner but when I run the code it says "impressive" and passed all tests but when I hit submit it says that something is wrong. I ran the test in an external text editor and it works so I am not sure why it isn't working. I am using javascript.
I am getting a result that says "expected: 0, instead got: 0" It passes for the number 0+ but for numbers <0 I get this and I am positive my program works because I have tried it in an external environment so I am not sure why this won't accept my answer.