Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit aee7d3f

Browse files
committedJun 12, 2019
Merge remote-tracking branch 'upstream/master'
2 parents 1083e66 + 05e5172 commit aee7d3f

File tree

9 files changed

+8
-7
lines changed

9 files changed

+8
-7
lines changed
 

‎.vs/Python/v15/.suo

-16.5 KB
Binary file not shown.

‎.vs/slnx.sqlite

-172 KB
Binary file not shown.

‎matrix/matrix_multiplication_addition.py renamed to ‎matrix/matrix_operation.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import print_function
2+
13
def add(matrix_a, matrix_b):
24
rows = len(matrix_a)
35
columns = len(matrix_a[0])
@@ -70,13 +72,12 @@ def main():
7072
matrix_b = [[3, 4], [7, 4]]
7173
matrix_c = [[11, 12, 13, 14], [21, 22, 23, 24], [31, 32, 33, 34], [41, 42, 43, 44]]
7274
matrix_d = [[3, 0, 2], [2, 0, -2], [0, 1, 1]]
73-
74-
print(add(matrix_a, matrix_b))
75-
print(multiply(matrix_a, matrix_b))
76-
print(identity(5))
77-
print(minor(matrix_c , 1 , 2))
78-
print(determinant(matrix_b))
79-
print(inverse(matrix_d))
75+
print('Add Operation, %s + %s = %s \n' %(matrix_a, matrix_b, (add(matrix_a, matrix_b))))
76+
print('Multiply Operation, %s * %s = %s \n' %(matrix_a, matrix_b, multiply(matrix_a, matrix_b)))
77+
print('Identity: %s \n' %identity(5))
78+
print('Minor of %s = %s \n' %(matrix_c, minor(matrix_c , 1 , 2)))
79+
print('Determinant of %s = %s \n' %(matrix_b, determinant(matrix_b)))
80+
print('Inverse of %s = %s\n'%(matrix_d, inverse(matrix_d)))
8081

8182
if __name__ == '__main__':
8283
main()

0 commit comments

Comments
 (0)
Please sign in to comment.