These are chat archives for Codewars/

Oct 2016
def comp(array1, array2):
if not array1 or not array2:
return False
for i in array2:
    x = 0
    for j in array1:
        if i == j*j:
            x += 1
    if x < 1:
        return False
    return True
Test Results:
Basic tests
✔ Test Passed
✔ Test Passed
✔ Test Passed
✘ False should equal True
Banging my head against the wall trying to figure out why the final one fails. Any ideas?
Jesse R. Johnson
Oct 11 2016 18:50
I just found the discussion forum. Learned to use the print function so I can see the test case. Now I know what to do.
Derek Alia
Oct 11 2016 22:22
Hi All
Giacomo Sorbi
Oct 11 2016 22:24
@jessejohnsohn, looking at your indentation, the else clause is a clause of the loop, not of the if: is that what you want?