Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit05e5172

Browse files
qckzrpoyea
authored andcommitted
.vs/ directory, matrix_multiplication_addition file and binary tree directory (#894)
* Added print function into matrix_multiplication_addition.py and removed blank space in data_structures/binary tree directory* Removed .vs/ folder per #893* Rename matrix_multiplication_addition.py to matrix_operation.py
1 parent066f374 commit05e5172

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.
File renamed without changes.
File renamed without changes.

‎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__importprint_function
2+
13
defadd(matrix_a,matrix_b):
24
rows=len(matrix_a)
35
columns=len(matrix_a[0])
@@ -63,13 +65,12 @@ def main():
6365
matrix_b= [[3,4], [7,4]]
6466
matrix_c= [[11,12,13,14], [21,22,23,24], [31,32,33,34], [41,42,43,44]]
6567
matrix_d= [[3,0,2], [2,0,-2], [0,1,1]]
66-
67-
print(add(matrix_a,matrix_b))
68-
print(multiply(matrix_a,matrix_b))
69-
print(identity(5))
70-
print(minor(matrix_c ,1 ,2))
71-
print(determinant(matrix_b))
72-
print(inverse(matrix_d))
68+
print('Add Operation, %s + %s = %s\n'%(matrix_a,matrix_b, (add(matrix_a,matrix_b))))
69+
print('Multiply Operation, %s * %s = %s\n'%(matrix_a,matrix_b,multiply(matrix_a,matrix_b)))
70+
print('Identity: %s\n'%identity(5))
71+
print('Minor of %s = %s\n'%(matrix_c,minor(matrix_c ,1 ,2)))
72+
print('Determinant of %s = %s\n'%(matrix_b,determinant(matrix_b)))
73+
print('Inverse of %s = %s\n'%(matrix_d,inverse(matrix_d)))
7374

7475
if__name__=='__main__':
7576
main()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp