Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Creative category for Skew-symmetric Matrix by panaro32
def checkio(m):
return m==[[-x for x in l] for l in zip(*m)]
if __name__ == '__main__':
assert checkio([
[0, 1, 2],
[-1, 0, 1],
[-2, -1, 0]]) == True, "1st example"
assert checkio([
[0, 1, 2],
[-1, 1, 1],
[-2, -1, 0]]) == False, "2nd example"
assert checkio([
[0, 1, 2],
[-1, 0, 1],
[-3, -1, 0]]) == False, "3rd example"
June 9, 2014
Comments: