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.
fixed. the exponent is now distributed over the entire
double
range.Looks good!
I updated the assertion messages, can you check it out ?
This comment is hidden because it contains spoiler information about the 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
Thank you KayleightWasTaken! You we pointing me about this issue of test cases in a different kata but I forgot to change it here :/ . I will go around my other katas shortly and modify it and make sure not to do this mistake again!
So what happens with the functions that generate structures. I have one for generating bad structures
generate_bad_structure
which should ideally test forFalse
cases andgenerate_nested
which generateTrue
case structures and 50% chance to select one of them.generate_bad_structure
generates random nested arrays and usually they are False structures but I also noticed that ocasionally it does create some true structures ( usually, when the structure is small like [ [],[],[] ]). I think, they should be fine but, if not, please let me know.Hi! Yes, you are definitely right about antipattern. Just have approved the proposed translation by KayleighWasTaken which tackles the problem
Somewhat refactored the tests here. Didn't touch the test generation code itself though, not currently awake enough to try to parse what exactly it's trying to achieve, though
generate_bad_structure
seems to generateTrue
cases sometimes, and the inverse forgenerate_nested
?I'll have a go at cleaning up the tests a little and adding assertion messages etc then.
This comment is hidden because it contains spoiler information about the solution
clean kata
I am very sorry, I forgot to rename it there. Should be renamed now
The function name in the initial solution and in the sample tests is
all_or_none
but in the full tests it isis_cleanly_nested
Loading more items...