Addition, multiplication and transpose of lists in python.

Addition of matrices:- Take the size of the matrix as user input, accept the two matrices and print the resultant matrix after adding the original two matrices. row=int(input(“enter the row”)) column=int(input(“enter the column”)) a=[] b=[] print(“1st matrix elements”) for i in range(0,row): a1=[] for j in range(0,column): e=int(input()) a1.append(e) a.append(a1) print(“2nd matrix elements”) for i…… Continue reading Addition, multiplication and transpose of lists in python.

Design a site like this with WordPress.com
Get started