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.
[2, 0]
or[0, 2]
means one side of the package has a good apple, and the other side is bad.[0, 0]
means both sides of the package are bad, indicating a fully rotten package.The "out of range" error is likely caused by accessing indices in an empty list or an incorrectly handled case when dealing with partial or empty crates.
python new test frameworks
Nice!
What do they mean by this?
As mentioned by B4B below, this is not well explained (
Also note how fruits in a package are ordered when repacking. Example shown in INPUT/OUPUT above.
)Python 3.8 should be enabled.
You should have let this issue opened, the process to eliminate boxes on the run is really unclear.
i got it right except... my code can't hande empty boxes. i get "out of range" msg.
any ideas?
Well, you should raise a
question
instead in this case. Otherwise we're confused too ;-)Hi,
I didn't mean to imply that there was something wrong with the kata. I was just confused by the random tests. Thanks for the tip about printing the input to the console.
Hi,
First, this is not an issue, this is a question. "Obviously", since 97 people already completed the kata in JS, it's a problem in your code, not in the kata (issues are for the latter case).
About your question, so: yes, there are random tests that your code has to pass. That means your code doesn't handle properly some edge case that appears in the random tests only. You should print the input to the console to debug your code.
Okay, this is strange. I am getting a type error for an undefined object property but each time I run the attempt I pass a different number tests, even without changing the code. Doesn't it always run the same tests? How can I be passing 20 tests in some runs and 0 in others with the same code?
I also can't debug the type-erros since I am not being shown the input that produces it. It passes all the sample tests plus more sample inputs I came up with. I can't see why it would produce the type error.
Any suggestions?
This comment is hidden because it contains spoiler information about the solution
Loading more items...