Linear Algebra

Sort by

recency

|

289 Discussions

|

  • + 0 comments

    code

    import numpy as np arr = [] for i in range(int(input())): a = list(map(float, input().split())) arr.append(a)

    print(round(np.linalg.det(arr), 2))

  • + 0 comments

    import numpy my_arr = [] for _ in range(int(input())): my_arr.append(list(map(float, input().strip().split()))) print(round(numpy.linalg.det(my_arr), 2))

  • + 0 comments
    import numpy as np
    arr = []
    for i in range(int(input())):
        a = list(map(float, input().split()))
        arr.append(a)
    
    print(round(np.linalg.det(arr), 2))
    
  • + 0 comments

    Here's my code:

    from numpy import linalg
    print(round(linalg.det([list(map(float, input().split())) for _ in range(int(input()))]), 2))
    
  • + 0 comments

    import numpy n = int(input()) a = ([list(map(float, input().split()))for i in range(n)]) a = numpy.array(a) print(round(numpy.linalg.det(a),2))