@@ -0,0 +1,1270 @@
+#!/usr/bin/python2.7%0Aimport numpy as num%0Aimport sys%0Aimport csv     %0Adef crout(A):%0A n = A.shape%0A if(n%5B0%5D!=n%5B1%5D):%0A  print(%22Give matrix is not square matrix. Code Terminated%22)%0A  sys.exit()  %0A n=n%5B0%5D%0A A = num.mat(A,dtype=float)%0A U = num.matrix(A*0)%0A L = num.matrix(U)%0A for i in range(0,n):%0A  L%5Bi,0%5D = A%5Bi,0%5D%0A  U%5Bi,i%5D = 1   %0A for j in range(1,n):%0A  U%5B0,j%5D = A%5B0,j%5D/L%5B0,0%5D%0A for i in range(1,n):%0A  for j in range(1,i+1):%0A   L%5Bi,j%5D = A%5Bi,j%5D - L%5Bi,range(0,j)%5D * U%5Brange(0,j),j%5D%0A  for j in range(i,n):%0A   U%5Bi,j%5D = (A%5Bi,j%5D - L%5Bi,range(0,i)%5D * U%5Brange(0,i),j%5D)/L%5Bi,i%5D%0A print %22A=%5Cn%22,A,%22%5Cn%5CnUpper=%5Cn%22,U,%22%5Cn%5CnLower=%5Cn%22,L,%22%5Cn%5CnA=Lower*Upper%5Cn%22,L*U %0A return%0A%0Atry:%0A FILE = open(sys.argv%5B1%5D,'r')%0A reader = csv.reader(FILE)%0A mat = num.matrix(%5Bmap(float,row) for row in reader%5D)%0A crout(mat)%0Aexcept IndexError:%0A print(%22No Data File is provided in command line argument%22)%0A print %22Run Following command for help%5Cn%22,sys.argv%5B0%5D,%22--help%22%0Aexcept IOError:%0A print(%22-------------------HELP-------------------%22)%0A print %22This Code takes file in csv as command line argument having numbers stored in matrix fashion%5Cn%22%0A print %22for ex:%5Cn%22,%22matrix.csv%5Cn%22,%22%5Cn1,2,3%5Cn5,6,3%5Cn5,3,6%5Cn%22%0A print %22Run the code using following command%5Cn%22,sys.argv%5B0%5D,%22matrix.csv%5CnOr%22%0A print %22python%22,sys.argv%5B0%5D%5B2:%5D,%22matrix.csv%22%0A  %0A

Create crout.py