What will be your log if m=''?
m=''
Try print(repr(s), repr(m)).
print(repr(s), repr(m))
The problem is with your solution. It fails following test case:
test.assert_equals(is_planet_mnemonic_correct(["Mars", "Earth", "Neptune", "Asteroid", "Venus"], ""), False)
When the parameter is_exclusive is False, it means the list should be evaluated as: True or True or True, which is clearly True :P
is_exclusive
False
True or True or True
True
No problem! I'm glad it worked out :)
hmm. Maybe your output has a trailing space. That could be an issue too. Check that. If it still doesn't work, show me your code.
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.
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.
Loading collection data...
What will be your log if
m=''
?Try
print(repr(s), repr(m))
.The problem is with your solution. It fails following test case:
test.assert_equals(is_planet_mnemonic_correct(["Mars", "Earth", "Neptune", "Asteroid", "Venus"], ""), False)
When the parameter
is_exclusive
isFalse
, it means the list should be evaluated as:True or True or True
, which is clearlyTrue
:PNo problem! I'm glad it worked out :)
hmm. Maybe your output has a trailing space. That could be an issue too. Check that. If it still doesn't work, show me your code.
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.
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.