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.
I get it, thanks!
no, since expected and actual are swapped, so when you read something like:
(because I guess that's globaly what you are seeing), that actually means you should read/have:
Meaning your code isn't returning the expected value.
@Blind4Basics: Why isn't the solution correct? I get it's by no means elegant or efficient, but it outputs the correct result, right?
no global vars here, but rather an actual mistake in the translation. @joh_pot: please see above.
@ferrara: still, your solution isn't correct, so. ;)
actual and expected values are swapped in python (random tests part)
It seems like you're attempting the python translation. I'm not the author of the python translation and I'm not versed in the language but it seems like you're using global variables to track state. The test suite calls your function hundreds of times and if you're not resetting your global vars, it will fail.
This comment is hidden because it contains spoiler information about the solution
It took me only 1 hour to write these 5 lines and not have errors pop up.
I feel like I'm learning a lot with every kata I complete, looking up old SO questions and browsing the documentation.
Honestly there are more elegant ways to do this, but I'm glad how it came out, it kinda even looks like I know what I'm doing.
List comprehensions ARE clever, but there's a time and place for them ;)
Thanks for the answers, I'll use the proper markdown next time. Sorry for the inconvenience.
Your functions should return in CW, not print. Also, use Question, not Issue label for things like this, and use proper markdown
You're not returning anything.
This comment is hidden because it contains spoiler information about the solution
Print the inputs, and see what cases you're failing.
Not sure what language you are using, but try to print out what the inputs are for debugging purposes.
Loading more items...