Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in 3rd party category for Determinant by Pavellver
import numpy as np
def checkio(data):
data = np.array(data)
return round(np.linalg.det(data))
# These "asserts" using only for self-checking and not necessary for auto-testing
if __name__ == "__main__":
assert checkio([[4, 3], [6, 3]]) == -6, "First example"
assert checkio([[1, 3, 2], [1, 1, 4], [2, 2, 1]]) == 14, "Second example"
April 12, 2023
Comments: