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.
When the parameter
is_exclusive
isFalse
, it means the list should be evaluated as:True or True or True
, which is clearlyTrue
:PCould you please let me know where I am going wrong?
For example, for [True,True, True] and False, my answer was False because ,as in the example in the instructions, (p ⊻ q) ⊻ r = True , so the single boolean of “False” is False. Thank you.
No problem! I'm glad it worked out :)
Thank you very much for your advice. There was indeed a trailing space.
My code fails in many of the tests but I find it impossible to work out what is wrong.
This is a simple example:
'abaaa baabb' should equal 'abaaa baabb'
How can that be wrong?
A very nice Kata to (re)learn a very useful build-in package.
With that my first idea shrunk to basically 2 lines.
but the second group is not. if there is ANY group of less than 4 zeroes, then the array is NOT 0-plentiful, and you should return 0.
If EVERY group of zeros is of length >= 4, then you return the number of such groups.
Replies to previous questions indicate that, for example, the answer for {0,0,0,0,1,0,0,0} should be 0 because "every group of zeros has to be at least 4 items long" Could you please explain why the first four zeros are not considered to be a group of 4?
The first value in that error message is what your function returned, not the input value. There are several open issues below for Python, tho. Check mrtp0's one.
The instructions say:
“When inserted, the copied elements overwrite others...”
So how can the following be correct,please? The length of the second list is less than the original
[ 7, 'r', 'y', 's', 'm', 'x', 'f', 1, 5, 5, 'v', 'j', 'i', 'g', 'h', 2, 'g', 1, 0, 4, 'o', 2, 'r'] should equal [7, 'r', 1, 5, 5, 'v', 'j', 'i', 'g', 'h', 2, 'g', 1, 0, 4, 'o', 2, 'r']
Hi,
I fully agree with this. Unbelievably I was criticised for inserting a similar test in a kata I authored.
I'm following the principle discussed here:
https://softwareengineering.stackexchange.com/questions/103471/how-should-i-handle-invalid-user-input
These are not the same. They all convert numbers into English words. My kata identifies place values of digits
Thanks. I'll label the relevant digits
Several "number to English word" katas in the same vein:
then there's this:
Loading more items...